Prerequisites
Required
Node.js 16+
Required for the CLI tool to run
Claude Code
The AI coding assistant you’re already using
Verify Node.js installation
Check your Node.js version:Expected output:
If you don’t have Node.js installed, download it from nodejs.org
Strongly recommended: jq
jq is a lightweight JSON processor that enables advanced features. Without it, your statusline will have limited functionality.
With jq
- ✓ Context remaining percentage
- ✓ Token statistics
- ✓ Session timer
- ✓ Full feature set
Without jq
- ✗ No context tracking
- ✗ No token stats
- ✗ No session timer
- ⚠️ Basic fallback parser
- macOS
- Linux
- Windows
Install jq using Homebrew:Verify installation:
Optional dependencies
git - For branch display
git - For branch display
ccusage - For session reset tracking
ccusage - For session reset tracking
ccusage is used for session reset time tracking. It works via
npx with no installation needed:ccusage is optional and only needed for the session timer feature. All other features (including cost tracking) work without it.
Installation options
cc-statusline can be installed globally or on a per-project basis.- Quick install (recommended)
- Global installation
- Custom installation
Run the interactive installer with npx (no global installation needed):This command:
- Prompts you for configuration preferences
- Generates an optimized bash script
- Installs to
.claude/statusline.sh(project) or~/.claude/statusline.sh(global) - Updates
settings.jsonautomatically
Installation process
Select features
Choose which features to enable (all are pre-selected by default):
Use Space to toggle features, Enter to confirm.
Installation completes
The installer will:
- Generate your custom statusline script
- Create
.claude/statusline.shwith execute permissions - Update
.claude/settings.jsonwith the statusline configuration - Display a success message
File structure
After installation, you’ll have the following files:View generated statusline.sh
View generated statusline.sh
View settings.json configuration
View settings.json configuration
Manual configuration
If auto-configuration fails, you can manually update your.claude/settings.json:
Windows users need to prefix the command with
bash to ensure the script runs in a bash environment (Git Bash, WSL, etc.).Verify installation
Preview your statusline before restarting Claude Code:Safety features
cc-statusline includes several safety mechanisms:Safe updates
Never overwrites existing statuslines without confirmation
Settings protection
Preserves your existing settings.json configurations
Conflict detection
Warns when other statuslines are configured
Smart defaults
Project-level installation by default for safety
Next steps
Quick start guide
Learn how to use cc-statusline in under 60 seconds