Skip to content

examples: add statusline script with context window and rate limit bars#55098

Open
DGDrago wants to merge 1 commit intoanthropics:mainfrom
DGDrago:add-statusline-example
Open

examples: add statusline script with context window and rate limit bars#55098
DGDrago wants to merge 1 commit intoanthropics:mainfrom
DGDrago:add-statusline-example

Conversation

@DGDrago
Copy link
Copy Markdown

@DGDrago DGDrago commented Apr 30, 2026

Summary

  • Adds examples/statusline/statusline-command.sh — a Bash/Node.js statusline showing model name, current directory, color-coded context window bar, session cost, clock, and 5-hour rate limit bar
  • Adds examples/statusline/README.md with install instructions including Windows (Git Bash) path format
  • Works on macOS, Linux, and Windows (Git Bash / WSL); requires only Node.js

What it looks like

Sonnet 4.6  D:\myproject >  ████████░░ 42k left (21%)  $0.2817  21:45  Resets in 2 hr 14 min – ███░░░░░░░ 30% used

Color coding:

  • Context bar: green (>50% left) → yellow (>25%) → red
  • Rate limit bar: blue (<50% used) → yellow (<80%) → red

Test plan

  • Copy script, chmod +x, set statusLineCommand, verify it renders in terminal
  • Test on macOS/Linux with ~/.claude/ path
  • Test on Windows with /C/Users/<you>/.claude/ path (Git Bash)

Bash/Node.js statusline showing model name, cwd, color-coded context
window progress bar, session cost, clock, and 5-hour rate limit bar.
Works on macOS, Linux, and Windows (Git Bash).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant