klaus#
another status line for claude code
install#
git clone https://tangled.org/shwilliam.net/klaus
cd klaus
./install.sh
restart claude code after installing
uninstall#
./uninstall.sh
themes#
defaults to dark theme
export KLAUS_THEME=light
or set it in your shell profile
rate limits#
shows 5h session and 7d weekly usage via the anthropic oauth api (requires macos keychain access and pro/max plan with oauth login)
cached for 60s by default
export KLAUS_USAGE_CACHE_TTL=120
testing#
pipe mock json to test output
echo '{"model":{"display_name":"Opus 420"},"context_window":{"used_percentage":34,"total_input_tokens":12000,"total_output_tokens":3000},"cost":{"total_lines_added":48,"total_lines_removed":12},"workspace":{"current_dir":"/tmp/test"}}' | ./klaus.sh
available data fields#
from statusline json
| field | path |
|---|---|
| model name | model.display_name |
| working dir | workspace.current_dir |
| context % | context_window.used_percentage |
| input tokens | context_window.total_input_tokens |
| output tokens | context_window.total_output_tokens |
| lines added | cost.total_lines_added |
| lines removed | cost.total_lines_removed |
| agent name | agent.name |
from oauth api
| field | source |
|---|---|
| 5h usage % | five_hour.utilization |
| 7d usage % | seven_day.utilization |
requirements#
- bash
- jq
- curl
- git (for branch/repo info)
- macos keychain (for rate limit data)