curl -fsSL https://raw.githubusercontent.com/lwlee2608/tokentop/main/install.sh | sh
Or build from source:
git clone https://github.com/lwlee2608/tokentop.git
cd tokentop
make install
Both methods install the binary to ~/.local/bin/tokentop. Override with PREFIX=/usr/local.
Prerequisites
Claude: An active Claude Code session — credentials are picked up automatically from the macOS Keychain (Claude Code-credentials) or ~/.claude/.credentials.json after you sign in with Claude Code.
Codex: An active Codex session with auth credentials at ~/.codex/auth.json (created automatically when you use Codex CLI).
OpenRouter: Set OPENROUTER_API_KEY environment variable. A management key is required for activity and credit details.
Documentation
Configuration — every config field, defaults, and examples
Providers — how Codex, OpenRouter, and Claude credentials are detected