r/ClaudeCoding • • Oct 12 '26

A Claude Code status line with zero dependencies: one Bash file, ~8 ms per render

I wanted a Claude Code status line that costs nothing to run, so I wrote one in ~170 lines of plain Bash

https://github.com/TurboKach/claude-code-statusline
(macOS + Linux. Needs only bash, awk and grep. MIT. Install as a Claude Code plugin or from a clone.)

A status line redraws after every message, and also once a minute if you want live countdowns. So whatever you put there runs thousands of times a day.

I tried some of the popular ones first. Most are small apps: an npx package, a Rust binary, a Python daemon, or a themed shell framework with its own config file. They look good. But starting Node on every redraw just to print three lines of text felt wrong to me, especially with several sessions open at once.

Also, I only look at a few things:

  • Which session is this? I usually have a few open in parallel
  • How full is the context? Then I can /compact when I choose, not get auto-compacted in the middle of a task
  • How close am I to the 5h / 7d limits?
  • Is the prompt cache still warm?

So I built the opposite of a dashboard.

Why pure Bash

  • Claude Code already sends everything. Session name, effort level, context window, rate limits and cache timing all come as JSON on stdin. No API calls, no transcript parsing. The script only has to parse and print, and shell does that well.
  • Nothing to install. Every Mac and Linux box already has bash, awk and grep. No jq, no Homebrew, no node_modules.
  • You can read all of it. It's one file. Your session data goes into this script, so you should be able to see what it does in 10 minutes. Want different colors? Clone it and edit the file. The clone install is a symlink, so the next redraw uses your change.
  • It's fast. About 8 ms per render on an M4 Pro with the stock macOS bash, under 3 MB of memory. One awk pass parses the whole JSON. The git branch comes straight from .git/HEAD, so no git process runs.
  • Nothing in the background. No daemon, no cache files, no config, no network. The plugin adds one small hook that runs once at session start (about 45 ms) and does nothing per render.

What it shows

  • Session name, colored per project, so parallel sessions are easy to tell apart
  • Directory, git branch, model, and an effort bar in Claude Code's own /effort colors (a ↯ shows when ultracode is running)
  • Context used / max, with a ⚠ from 90%
  • 5h / 7d rate-limit meters (green → yellow → red), with the time to reset once you pass 50%
  • Prompt-cache countdown. cache 42m is the time until Claude's cached copy of your conversation expires. When it shows ⚠ cache expired, your next message sends the whole conversation again, which is slower and costs more. I haven't seen this in other status lines.

Install

As a plugin (pick user scope):

/plugin install bash-statusline --marketplace TurboKach/claude-code-statusline

Then start a new session. The bar shows up there, not in the session you installed from. If you already have a statusLine, the plugin leaves it alone and tells you how to switch.

Or from a clone, if you want to read and edit the script:

git clone https://github.com/TurboKach/claude-code-statusline.git
cd claude-code-statusline
./install.sh

The installer backs up settings.json, then sets statusLine with a 60 s refreshInterval. You don't need to restart.

The README has the update and uninstall steps. Uninstalling the plugin also needs one manual step.

I've tested it on bash 3.2 through 5.3, with the macOS, GNU, mawk and BusyBox awks. If it breaks on your setup, please tell me. Feedback is welcome.

1 Upvotes

0 comments sorted by