Install a security-hardened status line for Claude Code CLI that displays:
text
user@host:dir (branch) | Model | In:8.5K Out:1.2K Cache:7K [23%]
git (optional, for branch display)scripts/statusline_installer.py -- Python 3, standard library only.
bash
# Install with defaults
python3 scripts/statusline_installer.py install
# Install with custom thresholds
python3 scripts/statusline_installer.py install --threshold-yellow 30 --threshold-orange 50 --threshold-red 70
# Install with combined token display
python3 scripts/statusline_installer.py install --token-display combined
# Check installation
python3 scripts/statusline_installer.py status
# Update config
python3 scripts/statusline_installer.py configure --threshold-red 80 --color-green cyan
# Remove
python3 scripts/statusline_installer.py uninstall [--remove-config]
install -- Copies statusline.py to ~/.claude/scripts/, creates config at ~/.claude/statusline.config (perms 600), updates ~/.claude/settings.local.json with python3 ~/.claude/scripts/statusline.py command.
status -- JSON output: script installed, config state, settings configured, git availability.
configure -- Update thresholds ( --threshold-yellow/orange/red), colors ( --color-green/yellow/orange/red), display mode ( --token-display separate|combined). Validates threshold ordering.
uninstall -- Removes script, reverts settings. --remove-config also deletes config file.
Config file: ~/.claude/statusline.config
OptionDefaultValuesTOKEN_DISPLAY``separate``separate (In/Out/Cache), combined (total)THRESHOLD_YELLOW``400-100THRESHOLD_ORANGE``500-100THRESHOLD_RED``700-100COLOR_*standard ANSIColor name or ANSI code
Available colors: green, yellow, orange, red, blue, cyan, magenta, purple, white, pink, bright-green, bright-yellow, bright-red, bright-blue, bright-cyan, bright-magenta.
Restart Claude Code ( exit then claude) to activate.