Status line for Claude Code CLI. Works with Anthropic or Z.AI.
Shows your current model, context percentage, git branch, how long you've been working, and API usage depending on your provider.
npx @thlinh/cc-statuslineThis uses Anthropic by default and installs to ~/.claude.
For Anthropic Enterprise spent-limit display:
npx @thlinh/cc-statusline --provider=anthropic --usage-display=spentFor Z.AI:
npx @thlinh/cc-statusline --provider=zai --dir ~/.claude-zFor scripts or dotfiles (skip the prompts):
npx @thlinh/cc-statusline --provider=zai --dir ~/.claude-z- jq — parses JSON
- curl — fetches usage
- git — branch info (optional)
macOS: brew install jq
Anthropic — pulls OAuth token from keychain, calls Anthropic's usage API, shows current/weekly/extra by default. Use --usage-display=spent for Enterprise spent-limit accounts.
Z.AI — reads token from ~/.chelper/config.yaml, calls Z.AI's quota API, shows token and tool usage.
npx @thlinh/cc-statusline --uninstall --dir ~/.claude-zRestores your backup if you had one, otherwise removes the files.
Three files end up in your claude config directory:
statusline.sh— main script (generated when you run the installer)statusline-helpers.sh— shared utilitiesstatusline-provider.sh— whichever provider you picked
MIT