5h ▓░░░░ 🟢
Context Bar v2
Model plus a 10-block context-usage bar. Example statusline inspired by the Claude Code docs (code.claude.com/docs/en/statusline).
26 installs
Before you install
- This version was reviewed before it was listed on Oct 9, 2026
- Doesn't ask to connect to the internet
- Needs jq.
- The bar is drawn with ▓ and ░ characters and has no color, so it never warns you as context fills.
Preview
Opus 4.8 ▓▓░░░░░░░░ 22%Opus 4.8 ░░░░░░░░░░ 0%Sonnet 4.6 ▓▓▓▓░░░░░░ 48%Opus 4.8 ▓▓▓▓▓▓▓▓▓░ 91%Fable 5 ▓▓▓▓▓▓░░░░ 64%Haiku 4.5 ░░░░░░░░░░ 0%Opus 4.8 ▓▓▓░░░░░░░ 37%Opus 4.8 ▓▓░░░░░░░░ 22%What it does
Shows the model name next to a 10-block bar and a percentage for how full the context window is.
- Written in
- Bash
- Network access
- None requested
- Works in
- Terminal
How it works
- Reads model.display_name and context_window.used_percentage from stdin with jq.
- Shades one block per full 10% used, rounding down, so 22% fills two of the ten.
- Before the first reply and right after /compact the bar is empty and reads 0%.
- At 91% used, nine blocks are shaded.
Source
#!/usr/bin/env bash
json=$(cat)
model=$(echo "$json" | jq -r ".model.display_name")
pct=$(echo "$json" | jq -r ".context_window.used_percentage // 0" | cut -d. -f1)
filled=$((pct / 10))
bar=""
test=""
for i in $(seq 1 10); do [ "$i" -le "$filled" ] && bar="${bar}\xe2\x96\x93" || bar="${bar}\xe2\x96\x91"; done
printf "%s %b %s%%" "$model" "$bar" "$pct"
Badge for your README
Own this listing? Add it to your README. The badge shows the install count as it grows.
[](https://staging.statuslin.es/c/context-bar-3fa85f14?utm_source=readme-badge)
Or show the preview card:

[](https://staging.statuslin.es/c/context-bar-3fa85f14?utm_source=readme-badge)
More status lines
Opus 4.8 high ✦ │ ctx 22% │ app (main) │ PR #1287 ● │ $0.41 · 10m +128 -34
Session ● ● ● ● ● ● ● ● ○ ○ ○ 74% left Resets in 2h 6m
Weekly ● ● ● ● ● ● ● ● ● ● ○ 93% left Resets in 2d 0h
Opus 4.8 │ main │ app │ ▓▓░░░░░░░░ 44k/200k │ $0.41
app · main · Opus-4.8 · effort high · ctx 22% · 5h 26% ↻2h6m · 7d 7% ↻2d0hOpus 4.8 · app on main[Opus 4.8] | ━━━━━━ 22% (44K/200K) | app | git:(main) | ⏱ 10m
Related mods
The session's context window fill, right above the prompt: gray while there is room, yellow when it is time to /compact, red when a new session is better.
· ↑ 37.0k ↓ 1.4k cache 7.0k · session ↑ 111.0k ↓ 4.2kEach turn's tokens and the session's running total, in color at the end of the hint line under the prompt.

Your context window as a stacked bar above the prompt, a color per category, with token counts and the compaction point. /context-bar shows or hides it.
⎿ cache-tax: keepwarm on for 6h00m, a ping 50m after each idle stretch keeps the cache read, not
re-written
⎿ cache-tax: claude-opus-5-5
state warm, 1h00m left
context 44,000 tokens
cold cost $0.35 to re-write it (warm turn $0.01)
keepwarm on, 6h00m left · ping in 50m
break-even up to 40 pings at the read rate cost one cold write, about 33h20m of idle at one
ping per 50m
guard ask first (/cache-tax guard warn to only show the price)
session 0 cold writes paid, $0.00
[>] cache-tax · warm · keepwarm 6h00m left · ping in 50m [-]A Claude Code mod that keeps the one-hour prompt cache warm during breaks and asks before a cold send, showing its estimated rewrite cost. Warming uses model requests and costs tokens. Requires Claude Code 2.1.287+.