Discord Rich Presence for Claude Code
npx claudepluginhub tsanva/cc-discord-presenceDiscord Rich Presence for Claude Code - Show your session on Discord
Show your Claude Code session on Discord! Display your current project, git branch, model, session time, token usage, and cost in real-time.
| Platform | Status |
|---|---|
| macOS (Apple Silicon) | ✅ Tested |
| macOS (Intel) | ⚠️ Untested |
| Linux (x64) | ⚠️ Untested |
| Linux (ARM64) | ⚠️ Untested |
| Windows (x64) | ✅ Tested |
| Windows (ARM64) | ⚠️ Untested |
Note: macOS Intel and Linux should work but haven't been verified. Please report problems.
Windows users: Requires Git Bash (included with Git for Windows) for automatic plugin hooks. Alternatively, run the PowerShell scripts manually (
scripts/start.ps1andscripts/stop.ps1). WSL won't work as Discord runs on the Windows host.
# Add the marketplace
claude plugin marketplace add tsanva/cc-discord-presence
# Install the plugin
claude plugin install cc-discord-presence@cc-discord-presence
That's it! The plugin will automatically start when you begin a Claude Code session and stop when you exit.
# Clone and build
git clone https://github.com/tsanva/cc-discord-presence.git
cd cc-discord-presence
go build -o cc-discord-presence .
# Run manually
./cc-discord-presence
The app reads session data from Claude Code in two ways:
By default, the app parses Claude Code's session files from ~/.claude/projects/. This works out of the box with no configuration needed.
For the most accurate token/cost data, you can configure the statusline integration. This uses Claude Code's own calculations instead of estimating from JSONL.
Automatic Setup (Recommended):
Run the setup script (requires jq):
# Find your plugin directory and run setup
~/.claude/plugins/cache/*/cc-discord-presence/*/scripts/setup-statusline.sh
Or if you have the repo cloned:
./scripts/setup-statusline.sh
The setup script will:
statusline-wrapper.sh to ~/.claude/~/.claude/settings.json automatically~/.claude/statusline.shManual Setup: If you prefer, edit ~/.claude/settings.json:
{
"statusLine": {
"command": "~/.claude/statusline-wrapper.sh",
"type": "command"
}
}
Then copy scripts/statusline-wrapper.sh to ~/.claude/statusline-wrapper.sh.
Note: Restart Claude Code after setup for changes to take effect.
Check which data source is being used by viewing the daemon log:
cat ~/.claude/discord-presence.log
You'll see one of:
✓ Found active session: project-name (using statusline data) - Best accuracy✓ Found active session: project-name (using JSONL fallback) - Working, but consider setting up statusline┌─────────────────────────────────┐
│ Clawd Code │
│ Working on: my-project (main) │
│ Opus 4.5 | 1.5M tokens | $0.1234│
│ 00:45:30 elapsed │
└─────────────────────────────────┘
# Build for current platform
go build -o cc-discord-presence .
# Cross-compile for all platforms
mkdir -p bin
GOOS=darwin GOARCH=arm64 go build -o bin/cc-discord-presence-darwin-arm64 .
GOOS=darwin GOARCH=amd64 go build -o bin/cc-discord-presence-darwin-amd64 .
GOOS=linux GOARCH=amd64 go build -o bin/cc-discord-presence-linux-amd64 .
GOOS=linux GOARCH=arm64 go build -o bin/cc-discord-presence-linux-arm64 .
GOOS=windows GOARCH=amd64 go build -o bin/cc-discord-presence-windows-amd64.exe .
Cost is calculated using current Claude API pricing (Dec 2025):
| Model | Input (per 1M tokens) | Output (per 1M tokens) |
|---|---|---|
| Opus 4.5 | $15.00 | $75.00 |
| Sonnet 4.5 | $3.00 | $15.00 |
| Sonnet 4 | $3.00 | $15.00 |
| Haiku 4.5 | $1.00 | $5.00 |
By default, this uses a shared Discord application ("Clawd Code"). If you want to use your own: