Context Burn Bar

·

MIT license

A minimal 5-slot block bar showing context-window usage with a green/yellow/red status dot.

Before you install

  • This version was reviewed before it was listed on Jun 29, 2026
  • Doesn't ask to connect to the internet
  • Calls jq to read the JSON.
  • The 5h label is fixed text. The bar tracks context-window use, not the 5-hour rate limit.
  • Nothing else is shown: no model, folder, branch or cost.
Not showing after you paste? Fix it

Preview

Clean repo
5h ▓░░░░ 🟢
New session
5h ░░░░░ 🟢
Dirty branch
5h ▓▓░░░ 🟢
Near-full
5h ▓▓▓▓▓ 🔴
1M context
5h ▓▓▓░░ 🟡
Post-compact
5h ░░░░░ 🟢
Worktree
5h ▓▓░░░ 🟢
Non-git
5h ▓░░░░ 🟢

In Claude Desktop

Context Burn Bar in Claude Desktop

Recorded with statusline-anywhere.

What it does

A five-slot block bar for context-window use, followed by a green, yellow or red dot. It is a quick read on how full the context is.

Written in
Bash
Network access
None requested
Works in
Terminal

How it works

  1. Reads only context_window.used_percentage with jq, using 0 when it is missing
  2. Rounds to the nearest 20% and fills that many of the five ▓ slots
  3. Picks 🟢 below 50%, 🟡 from 50% and 🔴 from 90%
  4. At 22% the preview shows one slot, at 64% three with 🟡, and at 91% all five with 🔴

Source

#!/bin/bash
# Claude Code context-window status bar.
# Reads the Claude Code status line JSON from STDIN and renders
# a compact 5-slot bar for the context window (5h) usage.

set -euo pipefail

input=$(cat)

PCT=$(echo "$input" | jq -r '.context_window.used_percentage // 0' | cut -d. -f1)

# Build a 5-slot progress bar: each slot = 20%.
filled=$(( (PCT + 10) / 20 ))
[ "$filled" -gt 5 ] && filled=5
bar=""
for i in 1 2 3 4 5; do
  if [ "$i" -le "$filled" ]; then
    bar="${bar}▓"
  else
    bar="${bar}░"
  fi
done

# Icon: green <50%, yellow 50-90%, red 90%+
if [ "$PCT" -ge 90 ]; then
  icon="🔴"
elif [ "$PCT" -ge 50 ]; then
  icon="🟡"
else
  icon="🟢"
fi

printf "5h %s %s\n" "$bar" "$icon"

Badge for your README

Own this listing? Add it to your README. The badge shows the install count as it grows.

Reviewed on statuslin.es
[![Reviewed on statuslin.es](https://statuslin.es/badge/c/context-burn-bar-ee4b4d78.svg)](https://statuslin.es/c/context-burn-bar-ee4b4d78?utm_source=readme-badge)

Or show the preview card:

Preview on statuslin.es
[![Preview on statuslin.es](https://statuslin.es/og/c/context-burn-bar-ee4b4d78.png)](https://statuslin.es/c/context-burn-bar-ee4b4d78?utm_source=readme-badge)

More status lines

  • 182 installs
app · main · Opus-4.8 · effort high · ctx 22% · 5h 26% ↻2h6m · 7d 7% ↻2d0h
  • 115 installs
Opus 4.8 [high] ~/app main 16:20:55 | ⛁ ██░░░░░░░░ 22% | 5h ●◔○○○ 26% ↻2h7m | 7d ◔○○○○○○ 7% ↻2d1h │ $0.41 ⏱ 10m
Opus 4.8 │ main │ app │ ▓▓░░░░░░░░ 44k/200k │ $0.41
  • 57 installs
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 Fable ● ● ● ● ● ● ● ● ● ○ ○ 85% left Resets in 2d 0h ◐ Read:index.ts ✓ Read×1 ✓ Bash×1 ✓ Edit×1 ✓ Grep×1 ◐ code-reviewer Review the change for regressions
app  main  Opus 4.8 ━━━━━━━━━━ 22%  128  34
Model: Opus 4.8 | Thinking: high | Context: [▰▰▱▱▱▱▱▱▱▱] 45k/200k (22%) | cwd: ~/app | ⎇ main | (+0,-0) Cost: $0.41 | Block: 2hr 6m | Weekly: 7.0% | Session: 10m | In: 916.7 t/s | Out: 29.2 t/s | Cached: 2k | Session: [▰▱▱▱▱] 26.0% Mem: 0.8G/1.0G | (*゚∀゚*) | Session ID: b8e1c0d2-4a6f-4e2a-9c1b-3f5d7a9e2c10

Related mods

· ↑ 37.0k ↓ 1.4k cache 7.0k · session ↑ 111.0k ↓ 4.2k

Each turn's tokens and the session's running total, in color at the end of the hint line under the prompt.

Context Meter in Claude Desktop

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.

Token Weather Usage in Claude Desktop

One line above the prompt: context tokens with their weather, a bar per recent prompt, your 5-hour and 7-day limits against the time elapsed, the prompt cache with its time left, the session cost with the last prompt's share in dollars and in points of the 5-hour limit, the subagents running, and a one-click pill for the GOs Claude proposes. Labels in English, French or Russian. After Token Weather (Anthropic, Apache-2.0) and the ideas of usage-meter (HolyGrail) and prompt-cache-control (Daniel San).

Deck in Claude Desktop

A cockpit for Claude Code: plan bars and subagent strips, context, usage limits with reset countdowns and burn rates, spend, the model route and a pet. Six bar styles, three collapsed looks. CLI and Desktop.