Single-line usage

One-line status bar showing your directory, git branch (with a * when dirty), model, live effort level, context-window usage, and 5-hour/7-day rate-limit usage.

182 installs

Before you install

  • This version was reviewed before it was listed on Jun 22, 2026
  • Doesn't ask to connect to the internet
  • Needs jq and git on your PATH.
  • A null used_percentage, as in a brand-new session, shows as ctx 0% rather than being hidden.
  • Only Opus, Sonnet and Haiku model IDs get a color; others, like Fable 5 in the previews, print plain.
Not showing after you paste? Fix it

Preview

Clean repo
app · main · Opus-4.8 · effort high · ctx 22% · 5h 26% ↻2h6m · 7d 7% ↻2d0h
New session
app · main · Opus-4.8 · effort high · ctx 0%
Dirty branch
app · feat/auth* · Sonnet-4.6 · effort med · ctx 48% · 5h 40% ↻1h11m · 7d 18% ↻2d21h
Near-full
app · main · Opus-4.8 · effort max · ctx 91% · 5h 88% ↻17m · 7d 61% ↻19h59m · Explanatory
1M context
app · main · Fable-5 · effort xhigh · ctx 64% · 5h 33% ↻3h29m · 7d 80% ↻4d23h
Post-compact
app · main · Haiku-4.5 · ctx 0% · 5h 52% ↻4h1m
Worktree
feature · worktree-feature · Opus-4.8 · effort low · ctx 37% · 5h 44% ↻2h49m · 7d 20% ↻1d6h
Non-git
scratch · Opus-4.8 · effort high · ctx 22%

In Claude Desktop

Single-line usage in Claude Desktop

Recorded with statusline-anywhere.

What it does

One line with your folder, git branch, model, effort level, context use and 5-hour and 7-day rate limits. Percentages turn yellow at 50% and red at 80%.

Written in
Bash
Network access
None requested
Works in
Terminal

How it works

  1. Reads folder, model, effort, context and rate-limit fields from stdin with jq
  2. Gets the branch from git and adds a * when tracked files differ from HEAD
  3. Colors each percentage by level and adds a ↻ countdown to each rate-limit reset
  4. Branch, effort and the 7d part drop out when missing; a non-default output style is added

Source

#!/bin/bash

input=$(cat)

dir=$(echo "$input" | jq -r '.workspace.current_dir')
model=$(echo "$input" | jq -r '.model.display_name')
model_id=$(echo "$input" | jq -r '.model.id')
output_style=$(echo "$input" | jq -r '.output_style.name')

dim="\033[2m"
reset="\033[0m"
bold="\033[1m"
cyan="\033[36m"
yellow="\033[33m"
green="\033[32m"
red="\033[31m"
magenta="\033[35m"
blue="\033[34m"

# Color helper: green <50, yellow 50-79, red >=80
color_for_pct() {
    local p=$1
    if [ "$p" -ge 80 ]; then echo "$red"
    elif [ "$p" -ge 50 ]; then echo "$yellow"
    else echo "$green"; fi
}

# Format a duration in seconds → "2h13m" / "47m" / "3d4h"
fmt_duration() {
    local s=$1
    [ "$s" -lt 0 ] && s=0
    local d=$((s / 86400))
    local h=$(((s % 86400) / 3600))
    local m=$(((s % 3600) / 60))
    if [ "$d" -gt 0 ]; then
        printf "%dd%dh" "$d" "$h"
    elif [ "$h" -gt 0 ]; then
        printf "%dh%dm" "$h" "$m"
    else
        printf "%dm" "$m"
    fi
}

# --- Line 1: orientation ---

dir_name=$(basename "$dir")

git_info=""
if git -C "$dir" rev-parse --git-dir &>/dev/null; then
    branch=$(git -C "$dir" -c core.useBuiltinFSMonitor=false rev-parse --abbrev-ref HEAD 2>/dev/null || echo '')
    if [ -n "$branch" ]; then
        if git -C "$dir" -c core.useBuiltinFSMonitor=false diff-index --quiet HEAD -- 2>/dev/null; then
            git_info="$branch"
        else
            git_info="${branch}*"
        fi
    fi
fi

short_model=$(echo "$model" | sed 's/Claude //' | sed 's/ /-/g')
if [[ "$model_id" == *"opus"* ]]; then
    model_str="${bold}${yellow}${short_model}${reset}"
elif [[ "$model_id" == *"sonnet"* ]]; then
    model_str="${cyan}${short_model}${reset}"
elif [[ "$model_id" == *"haiku"* ]]; then
    model_str="${blue}${short_model}${reset}"
else
    model_str="${short_model}"
fi

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

now=$(date +%s)
fh_pct_raw=$(echo "$input" | jq -r '.rate_limits.five_hour.used_percentage // empty')
sd_pct_raw=$(echo "$input" | jq -r '.rate_limits.seven_day.used_percentage // empty')

effort=$(echo "$input" | jq -r '.effort.level // empty')
case "$effort" in
    max)    effort_str="${bold}${red}max${reset}" ;;
    xhigh)  effort_str="${bold}${red}xhigh${reset}" ;;
    high)   effort_str="${red}high${reset}" ;;
    medium) effort_str="${yellow}med${reset}" ;;
    low)    effort_str="${green}low${reset}" ;;
    "")     effort_str="" ;;
    *)      effort_str="${dim}${effort}${reset}" ;;
esac

sep="${dim} · ${reset}"
line="${bold}${dir_name}${reset}"
[ -n "$git_info" ] && line+="${sep}${magenta}${git_info}${reset}"
line+="${sep}${model_str}"
[ -n "$effort_str" ] && line+="${sep}${dim}effort${reset} ${effort_str}"
line+="${sep}${dim}ctx${reset} ${ctx_color}${ctx_pct}%${reset}"

if [ -n "$fh_pct_raw" ]; then
    fh_pct=$(printf "%.0f" "$fh_pct_raw")
    fh_color=$(color_for_pct "$fh_pct")
    fh_reset=$(echo "$input" | jq -r '.rate_limits.five_hour.resets_at // empty')
    fh_suffix=""
    [ -n "$fh_reset" ] && fh_suffix=" ${dim}↻$(fmt_duration $((fh_reset - now)))${reset}"
    line+="${sep}${dim}5h${reset} ${fh_color}${fh_pct}%${reset}${fh_suffix}"
fi

if [ -n "$sd_pct_raw" ]; then
    sd_pct=$(printf "%.0f" "$sd_pct_raw")
    sd_color=$(color_for_pct "$sd_pct")
    sd_reset=$(echo "$input" | jq -r '.rate_limits.seven_day.resets_at // empty')
    sd_suffix=""
    [ -n "$sd_reset" ] && sd_suffix=" ${dim}↻$(fmt_duration $((sd_reset - now)))${reset}"
    line+="${sep}${dim}7d${reset} ${sd_color}${sd_pct}%${reset}${sd_suffix}"
fi

if [ "$output_style" != "null" ] && [ "$output_style" != "default" ]; then
    line+="${sep}${dim}${output_style}${reset}"
fi

printf "%b" "$line"

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/single-line-usage-31dcb76e.svg)](https://statuslin.es/c/single-line-usage-31dcb76e?utm_source=readme-badge)

Or show the preview card:

Preview on statuslin.es
[![Preview on statuslin.es](https://statuslin.es/og/c/single-line-usage-31dcb76e.png)](https://statuslin.es/c/single-line-usage-31dcb76e?utm_source=readme-badge)

More status lines

  • 115 installs
Opus 4.8 [high] ~/app main 16:20:55 | ⛁ ██░░░░░░░░ 22% | 5h ●◔○○○ 26% ↻2h7m | 7d ◔○○○○○○ 7% ↻2d1h │ $0.41 ⏱ 10m
  • 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
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
  • 21 installs
Opus 4.8 │ ✍️ 22% │ app (main) │ ● high current ●●○○○○○○○○ 26% ⟳ 6:59pm weekly ○○○○○○○○○○ 7% ⟳ aug 1, 5:52pm
  • 20 installs
Opus 4.8 | app@main | 44k/200k (22%) | effort: high | 5h 26% @18:59 | 7d 7% @Sat Aug 1, 17:52
  • 15 installs
🌿 main │ Opus 4.8/hi │ 🟢 Ctx ▓▓░░░░ 22% │ ⏳ 🟢 ▓▓░░░░ 26% ↻ 2h7m │ $0.41 ⏱ 10m

Related mods

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.

Flightdeck in Claude Desktop

Flightdeck: a live agent dashboard for Claude Code. Main model vitals, an on-call architect, every permission check, subagent cards and swimlanes, a turn receipt and a session log, all from real session events