1. Copy the scripts
cp fetch-usage.sh ~/.claude/fetch-usage.sh
cp statusline-command.sh ~/.claude/statusline-command.sh
chmod +x ~/.claude/fetch-usage.sh ~/.claude/statusline-command.sh2. Merge settings.json into ~/.claude/settings.json
Add the statusLine and hooks blocks from settings.json into your existing ~/.claude/settings.json. If you don't have one yet, copy it directly:
cp settings.json ~/.claude/settings.json3. Trigger an initial fetch (optional)
bash ~/.claude/fetch-usage.shThe usage cache will otherwise populate automatically on the next tool call or Claude response.
statusline-command.sh— reads the JSON piped by Claude Code and renders two lines: model/folder/branch, then usage stats and context window.fetch-usage.sh— reads the OAuth token from~/.claude/.credentials.json, caches it in/tmp/.claude_token_cachefor 15 minutes, hits the/oauth/usageendpoint (3s timeout), and writes results to/tmp/.claude_usage_cache. On failure the stale cache is preserved.settings.json— wires up the statusline command and triggersfetch-usage.shin the background onPreToolUseandStophooks.
jqcurlgit(optional, for branch display)
