Enable tokensight statusLine for real-time token quota display
Enable real-time token quota display in your status bar by configuring tokensight. Integrates with existing statusLine setups or installs standalone monitoring.
/plugin marketplace add zereraz/tokensight/plugin install tokensight@tokensightEnable the tokensight statusLine by detecting and integrating with any existing statusLine setup.
First, read ~/.claude/settings.json to see if a statusLine is already configured:
cat ~/.claude/settings.json | grep -A3 "statusLine"
Create a combined command that runs both renderers:
{
"statusLine": {
"type": "command",
"command": "bash -c 'node \"$(ls -td ~/.claude/plugins/cache/claude-hud/claude-hud/*/dist/index.js 2>/dev/null | head -1)\"; TOKENSIGHT=\"$(ls -td ~/.claude/plugins/cache/tokensight/tokensight/*/dist/statusline.js 2>/dev/null | head -1)\"; [ -n \"$TOKENSIGHT\" ] && node \"$TOKENSIGHT\" || true'"
}
}
This will display:
Install tokensight-only:
{
"statusLine": {
"type": "command",
"command": "bash -c 'node \"$(ls -td ~/.claude/plugins/cache/tokensight/tokensight/*/dist/statusline.js 2>/dev/null | head -1)\"'"
}
}
Ask the user if they want to:
Use the Edit tool to update ~/.claude/settings.json. Preserve all other fields, only update the statusLine section.
The statusLine:
~/.tokensight.json[Z.ai] ███████░░ 45% 110M left ↺ 1h 30mThe statusLine appears immediately - no restart needed.
After successful setup, check if we should ask about starring:
starPrompted exists and is truestarPrompted is not trueIf prompt is needed, use AskUserQuestion:
Only ask once per session (track this in memory, not persisted).
After getting a response:
gh api -X PUT /user/starred/zereraz/tokensight, then save "starPrompted": true to ~/.tokensight.json"starPrompted": true to ~/.tokensight.json (don't run gh command)