Customizable status line formatter for Claude Code CLI. Displays model info, git branch, token usage, and other metrics.
No installation required. Run directly with npx:
npx ccstatusline@latest(Bun is also supported via bunx ccstatusline@latest if you have it installed)
The interactive TUI lets you configure:
- Multiple status lines
- Widget selection and ordering
- Colors for each widget
- Powerline mode with custom separators
- Global formatting options
Settings are saved to ~/.config/ccstatusline/settings.json
Edit ~/.claude/settings.json:
{
"statusLine": "npx ccstatusline@latest"
}(Or use bunx ccstatusline@latest if you prefer Bun)
Set CLAUDE_CONFIG_DIR environment variable to use non-standard Claude Code config location:
export CLAUDE_CONFIG_DIR=/custom/path/to/.claude- Real-time metrics: model name, git branch, token usage, session duration, block timer
- Powerline mode with arrow separators and custom fonts
- Multi-line support
- Interactive TUI for configuration
- Global formatting options (padding, separators, bold, background)
- Cross-platform: Node.js 18+ (Bun also supported)
- Smart width detection with flex separators
- Context scaling factor (1.04) for percentage calculations
- Model Name
- Git Branch
- Git Changes (insertions, deletions, commits ahead, untracked files)
- Git Worktree
- Session Clock
- Session Cost
- Block Timer (time/progress bar modes)
- Current Working Directory
- Version
- Output Style
- Token metrics (input, output, cached, total)
- Context Length
- Context Percentage (200k limit)
- Context Percentage Usable (160k before auto-compact)
- Terminal Width
- Custom Text
- Custom Command (shell command output)
- Separator (|, -, comma, space)
- Flex Separator (expands to fill space)
- Full width always
- Full width minus 40 (default, reserves space for auto-compact message)
- Full width until compact (dynamic based on context percentage)
Requirements:
- Node.js 18+
- Git
git clone https://github.com/YOUR_USERNAME/ccstatusline.git
cd ccstatusline
npm install# Run TUI
npm run start
# Build
npm run build
# Lint and type check
npm run lint
# Generate API docs
npm run docsOr with Makefile:
make # Show available targets
make build # Build project
make run # Build and run TUIMakefile auto-detects npm or bun (if installed).
# Build project
npm run build
# Update ~/.claude/settings.json to point to local build
{
"statusLine": "node /absolute/path/to/ccstatusline/dist/ccstatusline.js"
}ccstatusline/
├── src/
│ ├── ccstatusline.ts # Main entry point
│ ├── tui/ # React/Ink UI
│ │ ├── App.tsx
│ │ ├── index.tsx
│ │ └── components/
│ ├── widgets/ # Widget implementations
│ ├── utils/ # Utilities
│ │ ├── config.ts
│ │ ├── renderer.ts
│ │ ├── powerline.ts
│ │ └── claude-settings.ts
│ └── types/ # TypeScript types
├── dist/ # Built files
└── package.json
Works on PowerShell, Command Prompt, and WSL. Requires Powerline-compatible font for optimal rendering.
Install JetBrains Mono Nerd Font:
winget install DEVCOM.JetBrainsMonoNerdFontGit must be in PATH. Install if needed:
winget install Git.Git- Fork the repository
- Create feature branch (
git checkout -b feature/name) - Commit changes (
git commit -m 'Add feature') - Push to branch (
git push origin feature/name) - Open Pull Request
MIT © Matthew Breedlove
Matthew Breedlove - @sirmalloc
