Quickstart: Plugin
Install the Trenchcoat plugin for Claude Code and send your first session.
Zero to live session data. About five minutes, two of which are restarting Claude Code twice.
Prerequisites
- Claude Code installed and working (
claude --version) - A Trenchcoat account — sign up free
- Python 3.10+ (
python3 --version)
Step 1: Create an API key
- Go to app.trenchcoat.io and sign in
- Open Settings → API Keys
- Click New API Key and name it (e.g. "My MacBook")
- Choose a capture level.
read:sessionsis enough to send events and records no content; widen it later if you want prompts or tool details stored. See Authentication. - Copy the key — it starts with
ct_live_and is shown once
Step 2: Install the plugin
/plugin marketplace add pando-codes/pando-plugins
/plugin install trenchcoat@pando-pluginsStep 3: Add your key
Add it to the env block of ~/.claude/settings.json:
{
"env": {
"TRENCHCOAT_API_KEY": "ct_live_your_key_here"
}
}Edit the file directly. /trenchcoat:connect has no "paste your key" prompt on purpose — anything typed into a Claude Code session becomes part of that session's transcript.
Now start a new Claude Code session. Environment variables from settings.json are read at session start, so the running session cannot see the key you just added.
Step 4: Connect
In the new session:
/trenchcoat:connectThis validates the key, writes the telemetry configuration, and sets content-capture flags to match your key's scopes.
Start another new session so those variables take effect. That is the second and last restart.
Step 5: Work, then end the session
Use Claude Code normally in any project. Events are recorded locally as you go.
cd ~/my-project
claudeEvents upload when the session ends, not on a timer — so finish the session before looking for it in the dashboard.
Step 6: View your session
Open the Sessions page at app.trenchcoat.io. Your session appears within a few seconds of ending.
Troubleshooting
No session after ending one
- Run
/trenchcoat:doctor— it checks credentials, connectivity, and the push queue in one pass - Confirm
TRENCHCOAT_API_KEYis in~/.claude/settings.json(notconfig.json— credentials never go there) - Run
/trenchcoat:reportto confirm events are being recorded locally. If they are, the problem is upload, not capture - Exit the session cleanly; a hard kill can skip the
SessionEndhook that triggers the upload
doctor reports OTel errors right after connecting
Expected — you have not restarted yet. doctor reports the running session's environment. Start a new session and re-run it.
Plugin not loading
/pluginshould listtrenchcoat- Check
~/.claude/trenchcoat/config.jsonhas"enabled": true
Events recorded but nothing uploads
/trenchcoat:doctor reports the queue depth. A queue that grows across sessions usually means the key is invalid or the API is unreachable — nothing is lost, and queued events go out with the next successful flush.