< cd ~/raba.pl

Developer & personal tools

Claude Code statusline

Keep the signals that affect the next coding decision in view.

  • live
  • February - July 2026
  • Solo: design, code

The problem

The line must be readable and cheap to refresh. Fetching every value on every render would turn an information tool into a source of delay.

My part

A personal developer tool I designed and built.

What this shows

I can make technical information actionable and pay attention to the performance and failure behavior of even a small tool.

Where it started

When an AI coding session is running, cost, remaining context, repository state and plan limits are scattered across commands and settings. I combined them into a Claude Code status line.

See it in action

Product walkthrough · 0:45 · 60 FPS · English narration
Claude Code statusline interface

English AI narration · Subtitles included · Play with sound, or read the transcript.

Read the video transcript

0:00 I built a compact status line for Claude Code, keeping cost, context and limits visible.

0:07 It reads the tool's status data and renders one line in the terminal.

0:13 Session and daily spend sit next to usage rate and an estimated time remaining.

0:20 Git state and local checks provide context from the current working directory.

0:33 A cached usage lookup adds plan limits without making every refresh a network request.

The decisions behind the product

Make the session understandable at a glance

The line shows cost, context use, burn rate and an estimate of remaining time, alongside the branch and working-tree state.

Cache according to the information

Slow sources refresh on separate schedules. Repository state, local results, daily cost and plan usage do not all need to be recomputed at the same rate.

Keep it working with partial information

Unavailable credentials or API responses leave the last cached value or omit the segment. The rest of the line still renders.

What came out of the work

One place for session decisions

The tool puts fifteen signals into one terminal status line, including cost, context, repository state and usage limits.

A small implementation with explicit behavior

The implementation is a Bash script with file caches and fallback behavior. Daily spending uses the latest cost per session so repeated renders do not count the same session twice.

  • 15session signals in one terminal lineSource code · checked 6 Oct 2026
  • Cachedslow sources refresh independentlySource code · checked 6 Oct 2026

Documentation interest

Google Search Console

Google search clicks

Exact documentation page: https://raba.pl/resources/claude-statusline

Latest month
01 Sept - 30 Sept 2026
First month
01 Apr - 30 Apr 2026

Search interest in the documentation page. It does not measure installs or active tool users.

Google search clicks per month, 1 Apr to 30 Sept 2026Google Search Console. Exact documentation page: https://raba.pl/resources/claude-statusline. Monthly clicks. 1 Apr: 0; 1 May: 0; 1 Jun: 0; 1 Jul: 0; 1 Aug: 1; 1 Sept: 0. Vertical axis starts at zero.011 Apr - 30 Apr 2026: 0 clicks1 May - 31 May 2026: 0 clicks1 Jun - 30 Jun 2026: 0 clicks1 Jul - 31 Jul 2026: 0 clicks1 Aug - 31 Aug 2026: 1 clicks1 Sept - 30 Sept 2026: 0 clicksAprMayJunJulAugSept
6 complete months · 1 Apr - 30 Sept 2026 · Download chartFirst month Latest month
Source, methodology and monthly data

Open Google Search Console report · Checked 8 Oct 2026

Exact documentation page: https://raba.pl/resources/claude-statusline. Provider timezone: America/Los_Angeles.

  • Six complete calendar months: 1 April to 30 September 2026. Current is September; comparison baseline is April. Both comparison months have 30 days. This is not a comparison against the preceding six months.
  • Final web-search data, all countries and devices, America/Los_Angeles reporting timezone. Search clicks are not website visits or unique visitors.
  • Domain properties include all subdomains with property aggregation. Documentation pages retain exact page filters from the preceding evidence collection and measure documentation interest, not adoption.
  • Monthly chart values and the six-month total are reconciled with independently queried totals.
  • The percentage, where shown, compares September 2026 with April 2026, the last and first complete months of this window.
  • April has fewer than 100 events, so absolute counts are shown without a percentage growth claim.
  • For fewer than 100 events in the baseline period, the comparison shows absolute counts instead of a percentage.
Complete monthly totals
MonthGoogle search clicks
1 Apr - 30 Apr 20260
1 May - 31 May 20260
1 Jun - 30 Jun 20260
1 Jul - 31 Jul 20260
1 Aug - 31 Aug 20261
1 Sept - 30 Sept 20260
PostHog recorded activity1 pageviews in 28 days

Exact documentation page: https://raba.pl/resources/claude-statusline · UTC

Recorded activity is affected by consent, blockers, tracking gaps and internal traffic.

Recorded totals, separate from search data
Metric7 Sept - 4 Oct 202610 Aug - 6 Sept 2026
Recorded pageviews10
Recorded sessions10

Inside the implementation

Explore the features, architecture and quality checks

What I built

  • One Bash script that Claude Code runs as its statusLine command: it reads the session JSON on stdin and prints a single coloured line
  • A 20-block context bar that turns from green to yellow to red as the window fills, next to input and output token totals
  • Session cost with cost per minute, and a day total summed from a local log of every session's latest cost
  • Burn rate in tokens per minute and an estimate of the minutes left before the context window is full
  • Lines added and removed, cache hit rate, and output tokens per dollar with a rank from bronze (5,000) to trophy (50,000)
  • Test results from a .test-status file, JUnit XML reports or Playwright's last run, and the git branch with staged, unstaged and untracked counts
  • 5-hour and 7-day plan usage from Anthropic's OAuth usage endpoint, with the token read from the macOS Keychain

How it works

  1. ReadClaude Code pipes the session JSON to the script on each status update.
  2. ComputeContext bar, cost per minute, burn rate, ETA and cache hit rate with jq and bc.
  3. CollectGit state cached 5 s, test results and the day total cached 30 s.
  4. LimitsPlan usage from the Anthropic API, at most once a minute.
  5. PrintUp to 15 segments in one ANSI-coloured line; empty ones are left out.

Quality and reliability

  • Every slow source sits behind a file cache: git for 5 s, test results and the day total for 30 s, plan usage for 60 s, so a render stays cheap
  • The day total keeps only the latest cost of each session from the log, so a session that renders a thousand times counts once
  • Without a Keychain token, or when the API does not answer within 5 seconds, the line still prints: the last cached limits stay, or the segment is left out

Technology

  • Bash
  • jq
  • bc
  • curl
  • git
  • macOS Keychain (security)
  • Claude Code statusLine hook

Explore another problem I worked on

>_ Your next project

Liked what you saw?
Let’s get in touch!

Have an idea, a challenge, or a role in mind? I’d love to hear about it.

Let’s talk

>_ Start a conversation

Liked what you saw?
Let’s get in touch!

Tell me what you’re working on. Let’s see how I can help.

Email mepatryk@raba.pl
Send a message