claude-bar
v1.0.3
Published
Themeable status line for Claude Code CLI
Maintainers
Readme
Why?
Claude Code doesn't show you how much a session is costing, how full your context window is, or how long you've been going. claude-bar adds a status line at the bottom of your terminal with all of that — and lets you pick how it looks.
Themes
Six built-in styles. Switch anytime. Zero restart.
emoji 📂 myproject | 🔢 322K ($5.02) | 📊 ████░░░░░░ 43% | ⏱ 1h10m | 🤖 Opus 4.6
minimal myproject ~ main +3-1 ~ tok:322K $5.02 ~ ctx:43% ~ t:1h10m ~ Opus 4.6
ascii [DIR:myproject] [GIT:main +3-1] [TOK:322K $5.02] [CTX:43%] [Opus 4.6]
compact myproject|main+3-1|322K$5.0|43%|1h10m|O46
powerline ▌ myproject ▌ main +3-1 ▌ 322K $5.02 ▌ CTX:43% ▌ Opus 4.6 ▌
nerd myproject │ main │ 322K ($5.02) │ ▓▓▓▓░░░░░░ 43% │ Opus 4.6nerd and powerline require a Nerd Font or Powerline-patched font.
Preview them live in your terminal:
claude-bar theme previewSetup
Requires jq (brew install jq / apt install jq) and Claude Code v2.1+.
npm (recommended):
npm install -g claude-bar
claude-bar # interactive — choose a theme
claude-bar -y # skip prompts, use defaultsnpx (no install):
npx claude-bar
npx claude-bar -ygit:
git clone https://github.com/AbdulrahmanMasoud/claude-bar.git ~/.claude/claude-bar
cd ~/.claude/claude-bar
bash bin/claude-barThen restart Claude Code. That's it.
- Verifies
jqis available - Copies runtime scripts to
~/.claude/ - Installs theme files to
~/.claude/themes/ - Writes config to
~/.claude/claude-bar.conf - Backs up
~/.claude/settings.json - Adds the statusLine entry:
{ "statusLine": { "type": "command", "command": "bash ~/.claude/statusline.sh" } }
What you get
| | Section | Example |
|-|---------|---------|
| Dir | Project name | myproject |
| Git | Branch + changes | main +12 -3 |
| Tokens | Session usage + cost | 322K ($5.02) |
| Context | Window usage bar | ████░░░░░░ 43% |
| Time | Session duration | 1h10m |
| Model | Active model | Opus 4.6 |
| Today | Daily tokens + cost | 450K ($7.80) |
| Month | Monthly spend | $42.50 |
Every section can be toggled on/off or reordered.
Configure
Edit ~/.claude/claude-bar.conf:
THEME=emoji # any built-in or custom theme name
SECTION_DIR=1 # 1 = visible, 0 = hidden
SECTION_GIT=1
SECTION_SESSION=1
SECTION_CONTEXT=1
SECTION_SESSION_TIME=1
SECTION_MEM=0
SECTION_MODEL=1
SECTION_TODAY=1
SECTION_MONTH=1
SECTION_ORDER="dir,git,session,context,time,model,today,month"Changes apply on next refresh. No restart needed.
Switch themes from the command line:
claude-bar theme list # see all available
claude-bar theme set minimal # switch instantlyMake your own theme
Drop a .sh file in ~/.claude/themes/ with these functions:
theme_init() # colors, variables
theme_separator() # between sections
theme_dir "$dir"
theme_git "$branch" "$adds" "$dels"
theme_tokens "$display" "$cost"
theme_context "$pct"
theme_time "$display"
theme_memory "$display"
theme_model "$name"
theme_today "$tokens" "$cost"
theme_month "$cost"
theme_wrap "$content" # optional outer wrapperThen activate it:
claude-bar theme set my-themeUse any file in lib/themes/ as a starting point.
Manage
claude-bar update # update scripts, keep config
claude-bar uninstall # clean remove, restore settings.json
claude-bar --helpTroubleshooting
Restart Claude Code (Ctrl+C then claude). Verify ~/.claude/settings.json contains the statusLine key.
The correct format is:
{ "statusLine": { "type": "command", "command": "bash ~/.claude/statusline.sh" } }Not a plain string.
Normal on a fresh session. Values populate after your first message.
Your font doesn't support the theme's glyphs. Switch to ascii: claude-bar theme set ascii
brew install jq (macOS) or apt install jq (Linux)
License
MIT
