@trquth/base-claude-statusline
v1.0.5
Published
A compact status line for [Claude Code](https://claude.com/claude-code).
Readme
🌿 base-claude-statusline
A compact status line for Claude Code.

It shows, on one line:
📁 my-project | ⎇ main | 🤖 Opus [high] | 🌿 ctx: 42% | 🕐 5h: 55% (50m) | 📅 7d: 72% (Tue 09:00 AM)| Segment | Meaning |
| ---------- | ------------------------------------------------------------------ |
| 📁 | Current directory name |
| ⎇ | Git branch |
| 🤖 | Model name, plus the effort level when it isn't medium |
| 🌿 ctx | Context window used (white under 50%, yellow under 75%, red above) |
| 🕐 5h | 5-hour rate limit used, with time until reset |
| 📅 7d | 7-day rate limit used, with the reset day and time |
Segments whose data isn't available are left out.
📋 Requirements
- 🐚
bash - 🔧
jq(brew install jqorapt install jq) - 📦 Node.js, for the
npxinstaller - 🔀
git, for the branch segment
🍎 🐧 Works on macOS and Linux.
🚀 Install
💡 Pick one method. Both set the status line up for a single project. Restart Claude Code (or start a new session) afterwards to see it.
⚡ Option 1: Automatic (npx)
Make sure Node.js and
jqare installed.Open a terminal in the project where you want the status line.
Run:
npx @trquth/base-claude-statuslineThe installer copies the script to
.claude/statusline.sh, setsstatusLinein.claude/settings.json(keeping your other settings) and warns ifjqis missing. Before changingsettings.jsonit asks a Yes/No question (default Yes); answer No to copy only the script and wire it up yourself. Add--yes(or-y) to skip the question; it is also skipped when the input is not a terminal.Restart Claude Code.
If .claude/settings.json already has a different statusLine, the installer leaves it alone. To replace it, add --force:
npx @trquth/base-claude-statusline --forceTo update later, run npx @trquth/base-claude-statusline@latest. From a clone, npx /path/to/base-claude-statusline works too.
🛠️ Option 2: Manual
Make sure
bashandjqare installed.Get
scripts/statusline.shfrom this repo (clone it, or download that one file).From your project root, copy it into place and make it executable:
mkdir -p .claude cp /path/to/base-claude-statusline/scripts/statusline.sh .claude/statusline.sh chmod +x .claude/statusline.shOpen
.claude/settings.json, creating it if it doesn't exist, and add thestatusLineentry. Keep any settings already in the file:{ "statusLine": { "type": "command", "command": "bash \"$CLAUDE_PROJECT_DIR\"/.claude/statusline.sh" } }Restart Claude Code.
🗑️ Uninstall
From the same project, run:
npx @trquth/base-claude-statusline --uninstallThis deletes .claude/statusline.sh and removes statusLine from .claude/settings.json, keeping your other settings. It deletes settings.json and .claude/ only if they end up empty. If statusLine was set to something other than this status line, it is left alone; add --force to remove it anyway.
To undo it by hand, delete .claude/statusline.sh and remove the statusLine entry from .claude/settings.json.
🧪 Try it without installing
Pipe sample JSON into the script:
echo '{"cwd":"'"$PWD"'","model":{"display_name":"Opus"},"context_window":{"used_percentage":42}}' | bash scripts/statusline.sh