Skip to content

amantidesigns/claude-code-statusline

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Claude Code Statusline with CodexBar Integration

Live rate-limit visibility in your Claude Code status bar.

Fork of the original work by @kanoliban (original gist)


Choose Your Layout

Standard

Full detail β€” model, plan tier, folder, branch, context, session, weekly, and cost.

[Opus 4.6 Β· Max] πŸ“ my-project β”‚ main β”‚ Ctx: 🟒 12% β”‚ Session: 66% β”‚ Weekly: 68% β”‚ $4.82

Minimal

~50% shorter β€” icon-based labels, no cost, no plan tier. Ideal if you use Companions/Buddies or have a narrow terminal.

Opus β”‚ πŸ“ my-project β”‚ main β”‚ 🟒 12% β”‚ ⏳ 66% β”‚ πŸ“… 68%

At a Glance

Standard Scenarios

Normal usage:

[Opus 4.6 Β· Max] πŸ“ app β”‚ main β”‚ Ctx: 🟒 8% β”‚ Session: 85% β”‚ Weekly: 72% β”‚ $3.21

Context warning (>60%):

[Opus 4.6 Β· Max] πŸ“ app β”‚ feat/auth β”‚ Ctx: 🟑 65% β”‚ Session: 45% (8:00PM) β”‚ Weekly: 68% β”‚ $12.34

Context critical (>80%), session and weekly running low:

[Opus 4.6 Β· Max] πŸ“ app β”‚ main β”‚ Ctx: πŸ”΄ 87% β”‚ Session: 30% (7:45PM) β”‚ Weekly: 25% (Mon 2pm) β”‚ $18.99

Minimal Scenarios

Normal usage:

Opus β”‚ πŸ“ app β”‚ main β”‚ 🟒 8% β”‚ ⏳ 85% β”‚ πŸ“… 72%

Context warning (>60%):

Opus β”‚ πŸ“ app β”‚ feat/auth β”‚ 🟑 65% β”‚ ⏳ 45% (8:00PM) β”‚ πŸ“… 68%

Context critical (>80%), everything hot:

Opus β”‚ πŸ“ app β”‚ main β”‚ πŸ”΄ 87% β”‚ ⏳ 30% (7:45PM) β”‚ πŸ“… 25% (Mon 2pm)

Icon Reference

Icon Meaning
🟒 Context 0–60% β€” plenty of room
🟑 Context 61–80% β€” wrap up soon
πŸ”΄ Context 81–100% β€” approaching limit
⏳ Session usage (resets every ~5 hours)
πŸ“… Weekly usage (resets every 7 days)
πŸ“ Current working directory
β”‚ branch Git branch (pipe-separated)

Reset times appear in parentheses when usage hits 50%+.


Quick Install

curl -fsSL https://raw.githubusercontent.com/amantidesigns/claude-code-statusline/main/install.sh | bash

The installer will:

  1. Check/install dependencies (jq, optionally codexbar)
  2. Ask you to choose Standard or Minimal layout
  3. Download the script and configure Claude Code
  4. Verify everything works

Manual Install

Prerequisites

  • macOS (uses stat -f %m for cache timing)
  • jq for JSON parsing
  • codexbar (optional, for rate limit data)

Step 1: Install Dependencies

brew install jq
brew install steipete/tap/codexbar   # optional but recommended

Step 2: Download the Script

Standard:

curl -fsSL https://raw.githubusercontent.com/amantidesigns/claude-code-statusline/main/statusline.sh -o ~/.claude/statusline.sh
chmod +x ~/.claude/statusline.sh

Minimal:

curl -fsSL https://raw.githubusercontent.com/amantidesigns/claude-code-statusline/main/statusline-minimal.sh -o ~/.claude/statusline.sh
chmod +x ~/.claude/statusline.sh

Step 3: Configure Claude Code

Add to ~/.claude/settings.local.json:

{
  "statusLine": {
    "type": "command",
    "command": "~/.claude/statusline.sh",
    "padding": 0
  }
}

Step 4: Restart Claude Code

Exit and start a new session. The status bar appears at the bottom of your terminal.


Segments

Standard Layout

Segment Example Source
Model + Plan [Opus 4.6 Β· Max] stdin + CodexBar
Folder πŸ“ my-project stdin
Git Branch β”‚ main git
Context % Ctx: 🟒 12% stdin
Session % Session: 66% CodexBar
Weekly % Weekly: 68% CodexBar
Cost $4.82 stdin

Minimal Layout

Segment Example Source
Model Opus stdin
Folder πŸ“ my-project stdin
Git Branch β”‚ main git
Context % 🟒 12% stdin
Session % ⏳ 66% CodexBar
Weekly % πŸ“… 68% CodexBar

When to Act

Signal What it means What to do
🟑 60–80% context Getting full Finish current task
πŸ”΄ 80%+ context Near limit Wrap up, start a new session
⏳ or Session < 50% Session draining Note reset time, pace usage
πŸ“… or Weekly < 50% Weekly draining Prioritize critical tasks

Switching Layouts

Already installed one and want to switch? Just re-download:

# Switch to minimal
curl -fsSL https://raw.githubusercontent.com/amantidesigns/claude-code-statusline/main/statusline-minimal.sh -o ~/.claude/statusline.sh

# Switch to standard
curl -fsSL https://raw.githubusercontent.com/amantidesigns/claude-code-statusline/main/statusline.sh -o ~/.claude/statusline.sh

No settings changes needed β€” both scripts use the same path.


Troubleshooting

Status bar doesn't appear

  • Verify script exists: ls -la ~/.claude/statusline.sh
  • Verify settings JSON: cat ~/.claude/settings.local.json | jq .
  • Restart Claude Code

No session/weekly data

  • Install CodexBar: brew install steipete/tap/codexbar
  • Run once to authenticate: codexbar --provider claude

No git branch showing

  • Make sure you're inside a git repository

Testing

echo '{"model":{"display_name":"Opus 4.6"},"cost":{"total_cost_usd":1.23},"context_window":{"context_window_size":200000,"current_usage":{"input_tokens":10000,"cache_creation_input_tokens":5000,"cache_read_input_tokens":5000}},"workspace":{"current_dir":"~/my-project"}}' | ~/.claude/statusline.sh

Credits

License

This project maintains the same license as the original work.

About

Enhanced setup for Claude Code status bar with CodexBar integration (fork of @kanoliban's work)

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages