Check your Z.ai GLM Coding Plan usage
View your Z.ai GLM Coding Plan usage statistics and manage your API token. Run with "today" for hourly breakdowns or "7d"/"30d" for summaries.
/plugin marketplace add zereraz/tokensight/plugin install tokensight@tokensightShow the user's Z.ai GLM Coding Plan usage stats by running the CLI with any arguments they provide:
node "${CLAUDE_PLUGIN_ROOT}/dist/index.js" <args>
If no arguments provided, default to "status".
Display the CLI output exactly as returned.
If user provides a token (starts with eyJhbGci), save it to ~/.tokensight.json:
After successfully showing usage stats (no errors), 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)Available commands:
Run /tokensight:uninstall first to clean up the statusLine, then run /plugin uninstall tokensight.
The uninstall command removes tokensight from your statusLine configuration to prevent broken commands.