Sandbox
@jarrodwatts/claude-hud

Claude Code statusline plugin for session activity

Claude HUD plugs into Claude Code’s native statusline API and updates in the terminal as your session runs. It reads Claude Code’s session data to show model, context usage, tools, agents, and todo progress, with optional configuration for layout and extra lines.

27,901 stars1.3k forksJavaScriptUpdated 11d ago
GitHub Trending Today #17: Claude HUD, Hacker Book, taws, Maestro, rustbpe, gh-issue-sync, CC-MIRROR
Github Awesome5.4k views • 8 months ago

Videos about this repo

Who it's for

Builders who run Claude Code and want live session status without switching context.

What it delivers

You can see what Claude is doing, how full your context is, and what task progress looks like without re-explaining or guessing.

What it does

Live context display

Shows the current model badge and a visual context bar with usage details.

Tool activity line

Can show completed tools like read, edit, and search as they happen.

Agent tracking

Can show active subagents and their current work.

Todo progress

Can show task completion progress in real time.

Git and workspace info

Can show the current project path, git branch, dirty state, and added directories.

Configurable layout

Supports presets and manual options for line layout, labels, colors, thresholds, and which HUD elements appear.

How to get it

  1. 1Step 1: Add the marketplace
    /plugin marketplace add jarrodwatts/claude-hud
  2. 2On older Claude Code versions, /tmp being a separate filesystem (tmpfs) caused plugin…
    EXDEV: cross-device link not permitted
  3. 3This Claude Code bug has since been fixed — if you hit it, update Claude Code first. If…
    mkdir -p ~/.cache/tmp && TMPDIR=~/.cache/tmp claude
  4. 4Then run the install command below in that session.
    /plugin install claude-hud
  5. 5After that, reload plugins (no restart needed)
    /reload-plugins
  6. 6Steps 1–2 can also be done outside a session with the Claude Code CLI
    claude plugin marketplace add jarrodwatts/claude-hud
    claude plugin install claude-hud@claude-hud

README

Claude HUD

A Claude Code plugin that shows what's happening — context usage, active tools, running agents, and todo progress. Always visible below your input.

License Stars

Claude HUD in action

🌐 English | 中文文档

Install

Inside a Claude Code instance, run the following commands:

Step 1: Add the marketplace

/plugin marketplace add jarrodwatts/claude-hud

Step 2: Install the plugin

⚠️ Linux users: Click here if install fails with an EXDEV error

On older Claude Code versions, /tmp being a separate filesystem (tmpfs) caused plugin installation to fail with:

EXDEV: cross-device link not permitted

This Claude Code bug has since been fixed — if you hit it, update Claude Code first. If you can't update, set TMPDIR before installing:

mkdir -p ~/.cache/tmp && TMPDIR=~/.cache/tmp claude

Then run the install command below in that session.

/plugin install claude-hud

After that, reload plugins (no restart needed):

/reload-plugins
Prefer the terminal?

Steps 1–2 can also be done outside a session with the Claude Code CLI:

claude plugin marketplace add jarrodwatts/claude-hud
claude plugin install claude-hud@claude-hud

Then run /reload-plugins inside your session (or start a new one).

Step 3: Configure the statusline

/claude-hud:setup
⚠️ Windows users: Click here if setup says no JavaScript runtime was found

On Windows, Node.js LTS is the supported runtime for Claude HUD setup. If setup says no JavaScript runtime was found, install Node.js for your shell first:

winget install OpenJS.NodeJS.LTS

Then restart your shell and run /claude-hud:setup again.

Done! Claude Code reloads settings automatically — the HUD appears after your next message, no restart needed. If it doesn't show up, restart Claude Code (older versions require a restart to pick up statusLine changes).


What is Claude HUD?

Claude HUD gives you better insights into what's happening in your Claude Code session.

What You SeeWhy It Matters
Project pathKnow which project you're in (configurable 1-3 directory levels)
Context healthKnow exactly how full your context window is before it's too late
Tool activityWatch Claude read, edit, and search files as it happens
Agent trackingSee which subagents are running and what they're doing
Todo progressTrack task completion in real-time

What You See

Default (2 lines)

[Opus] │ my-project git:(main*)
Context █████░░░░░ 45% │ Usage ██░░░░░░░░ 25% (1h 30m / 5h)
  • Line 1 — Model, provider label when positively identified (for example Bedrock, Vertex, MiniMax), project path, git branch
  • Line 2 — Context bar (green → yellow → red) and usage rate limits

Optional lines (enable via /claude-hud:configure)

◐ Edit: auth.ts | ✓ Read ×3 | ✓ Grep ×2        ← Tools activity
◐ explore [haiku]: Finding auth code (2m 15s)    ← Agent status
▸ Fix authentication bug (2/5)                   ← Todo progress

How It Works

Claude HUD uses Claude Code's native statusline API — no separate window, no tmux required, works in any terminal.

Claude Code → stdin JSON → claude-hud → stdout → displayed in your terminal
           ↘ transcript JSONL (tools, agents, todos)

Key features:

  • Native token data from Claude Code (not estimated)
  • Scales with Claude Code's reported context window size, including newer 1M-context sessions
  • Parses the transcript for tool/agent activity
  • Re-renders after each interaction (new assistant messages, /compact, permission changes, vim-mode toggles), debounced at 300ms

Configuration

Customize your HUD anytime:

/claude-hud:configure

The guided flow handles layout, language, and common display toggles. Advanced overrides such as custom colors and thresholds are preserved there, but you set them by editing the config file directly:

  • First time setup: Choose a preset (Full/Essential/Minimal), pick a label language, then fine-tune individual elements
  • Customize anytime: Toggle items on/off, adjust git display style, switch layouts, or change label language
  • Preview before saving: See exactly how your HUD will look before committing changes

Presets

PresetWhat's Shown
FullEverything enabled — tools, agents, todos, git, usage, duration
EssentialActivity lines + git status, minimal info clutter
MinimalCore only — just model name and context bar

After choosing a preset, you can turn individual elements on or off.

Manual Configuration

Edit ~/.claude/plugins/claude-hud/config.json directly for advanced settings such as colors.*, pathLevels, maxWidth, threshold overrides, display.timeFormat, display.hourCycle, and display.promptCacheTtlSeconds. Running /claude-hud:configure preserves those manual settings while still letting you change language, layout, and the common guided toggles.

If you run several Claude config directories via CLAUDE_CONFIG_DIR and symlink plugins/ to a shared location, plugins/claude-hud/config.json is the same physical file for all of them. Put per-directory settings in $CLAUDE_CONFIG_DIR/claude-hud.json instead - it uses the same shape, only needs the keys it changes, and is layered on top of the shared config at load time:

For example, put this in ~/.config/claude/work/claude-hud.json:

{ "display": { "customLine": "Work Team" } }

Simplified and Traditional Chinese HUD labels are available as explicit opt-ins. English stays the default unless you choose a Chinese locale in /claude-hud:configure or set language in config. The zh alias maps to Simplified Chinese, and zh-TW maps to Traditional Chinese. Guided config writes the canonical zh-Hans or zh-Hant value.

Options

OptionTypeDefaultDescription
languageen | zh | zh-Hans | zh-Hant | zh-TWenHUD label language. Use zh or zh-Hans for Simplified Chinese and zh-Hant or zh-TW for Traditional Chinese.
lineLayoutstringexpandedLayout: expanded (multi-line) or compact (single line)
pathLevels1-3 | full1Directory levels to show in project path, or full to show the entire absolute path
maxWidthnumber | nullnullOptional fallback width used only when terminal width detection fails completely
forceMaxWidthbooleanfalseAlways use maxWidth when it is set, even if terminal width detection returns a smaller value
elementOrderstring[]["project","addedDirs","context","usage","promptCache","memory","environment","tools","skills","mcp","agents","todos","sessionTime"]Expanded-mode element order. Omit entries to hide them in expanded mode. Existing configs keep their explicit order until updated.
projectLineOrderstring[][]Optional leading order of segments within the first line, in both layouts. Visibility stays with the display.show* flags, and omitted segments retain their existing renderer order. model covers provider + model + effort (plus the context bar in compact mode); project covers path + added dirs + git as one segment. Example: ["project","model"] puts the project/git block before the model badge.
display.mergeGroupsstring[][][["context","usage"]]Expanded-mode groups that should share a line when adjacent. Set [] to disable merged lines.
display.rightAlignstring[][]Starts a right-aligned suffix at the first listed element in a merged row, preserving elementOrder and padding the gap with spaces. Requires the anchor to be in a display.mergeGroups group that actually renders on one line. Ignored when the terminal width is unknown, the anchor is first, or there is no room for padding. Example: ["context"] with a ["project","context","usage"] group keeps project/git left and pins context + usage right.
gitStatus.enabledbooleantrueShow git branch in HUD
gitStatus.showDirtybooleantrueShow * for uncommitted changes
gitStatus.showAheadBehindbooleanfalseShow ↑N ↓N for ahead/behind remote
gitStatus.pushWarningThresholdnumber0Color the ahead count with the warning color at or above this unpushed-commit count (0 disables it)
gitStatus.pushCriticalThresholdnumber0Color the ahead count with the critical color at or above this unpushed-commit count (0 disables it)
gitStatus.showFileStatsbooleanfalseShow file change counts !M +A ✘D ?U
gitStatus.branchOverflowtruncate | wraptruncateKeep current truncation behavior or let the git block wrap onto its own line boundary when possible
jjStatus.enabledbooleanfalseOpt in to jj (Jujutsu) status. When enabled and a real .jj directory is found, jj is used instead of git for that repo — never both
jjStatus.showDirtybooleantrueShow * when the working-copy commit differs from its parent
jjStatus.showConflictsbooleantrueShow a !conflict marker when the working-copy commit has an unresolved conflict
display.showModelbooleantrueShow model name [Opus]
display.modelSourcestdin | auto | transcriptstdinControls which source the model name comes from. stdin preserves the default behavior and always uses what Claude Code reports. auto opts into proxy redirect detection by using transcript models only for non-Claude models. transcript always uses the model from the API response. Transcript model values are terminal-sanitized and capped at 80 characters
display.showProviderbooleanfalseShow the provider label before the model name, e.g. [Bedrock | Opus 4.6]. Useful when a custom proxy serves identically-named models from different providers. When off, an auto-detected provider still trails the model as before
display.providerNamestring""Explicit provider label used with display.showProvider, e.g. for a custom proxy that can't be auto-detected. Falls back to the auto-detected provider (Bedrock/Vertex/MiniMax/Enterprise) when empty; capped at 40 chars
display.showAddedDirsbooleantrueShow extra workspace directories from /add-dir (e.g. +sparkle +lib-foo); empty array renders nothing. In both layouts at most 5 dirs render (overflow shown as +N more) and basenames are truncated to 24 chars with
display.addedDirsLayoutinline | lineinlineinline puts dirs next to the project name with a +name prefix per dir; line renders them on a separate Added dirs: name1, name2 line (no + prefix, comma-separated)
display.showContextBarbooleantrueShow visual context bar ████░░░░░░
display.contextValuepercent | tokens | remaining | bothpercentContext display format (45%, 45k/200k, 55% remaining, or 45% (45k/200k))
display.autoCompactWindownumber | nullnullWhen set to a positive number such as 200000, compute the context percentage against this auto-compact window instead of the full model context window, matching the /context figure. Leave unset or null to preserve default full-window behavior.
display.showConfigCountsbooleanfalseShow CLAUDE.md, rules, MCPs, hooks counts
display.showCostbooleanfalseShow session cost using Claude Code's native cost.total_cost_usd when available, with a local estimate fallback for direct Anthropic sessions
display.showRoutedCostbooleanfalseAlso show cost for routed providers (Bedrock/Vertex), which showCost hides by default. Requires showCost too. Uses the native cost.total_cost_usd when positive (Cost), otherwise the token estimate (Est.)
display.showDailyCostbooleanfalseShow today's cumulative spend across sessions as Today $12.34, accumulated from the native cost.total_cost_usd into a small per-day ledger in the plugin data directory. Resets at local midnight. Independent of showCost
display.showOutputStylebooleanfalseShow the active Claude Code outputStyle from settings files as style: <name>
display.showDurationbooleanfalseShow session duration ⏱️ 5m
display.showSpeedbooleanfalseShow output token speed out: 42.1 tok/s
display.showUsagebooleantrueShow Claude subscriber usage limits when available
display.usageValuepercent | remainingpercentUsage display format (25% used, or 75% remaining)
display.usageBarEnabledbooleantrueDisplay usage as visual bar instead of text
display.usageCompactbooleanfalseDisplay usage in a shorter text form such as 5h: 25% (1h 30m); takes precedence over display.usageBarEnabled
display.showResetLabelbooleantrueShow the resets in prefix before usage countdowns
display.showModelScopedUsagebooleantrueShow the per-model weekly windows (model_scoped, e.g. Fable), whether they arrive on stdin or from the external usage snapshot. Set to false to render the usage line as if the payload carried none of them
display.timeFormatrelative | absolute | both | elapsed | elapsedAndAbsoluterelativeHow usage-window time is shown: countdown only (resets in 2h 30m), wall-clock reset (resets at 14:30), both, elapsed window percentage (53% elapsed), or elapsed plus wall-clock reset
display.hourCycleauto | h11 | h12 | h23 | h24autoHour cycle for wall-clock reset times (absolute/both/elapsedAndAbsolute modes). auto defers to the system locale; h23 forces 24-hour time (14:30) regardless of locale
display.showClockSecondsbooleanfalseShow seconds in wall-clock reset times, e.g. at 14:30:07
display.sevenDayThreshold0-10080Show 7-day usage when >= threshold (0 = always)
display.externalUsagePathstring""Optional absolute path to a local usage snapshot file. Relative paths are ignored. When stdin rate_limits are present, balance_label is appended and model_scoped windows fill in when stdin lacks them; when stdin windows are missing, valid usage windows can be used as a fallback
display.externalUsageWritePathstring""Optional absolute .json path in an existing directory. When stdin rate_limits exists, ClaudeHUD writes a private snapshot for other local tools. Relative paths, non-json files, and missing parent directories are ignored
display.externalUsageFreshnessMsnumber300000Maximum allowed age for the external usage snapshot before it is ignored
display.showTokenBreakdownbooleantrueShow token details at high context (85%+)
display.showToolsbooleanfalseShow tools activity line
display.showSkillsbooleanfalseShow active Skills detected from Skill tool invocations
display.showMcpbooleanfalseShow active MCP servers detected from mcp__server__tool invocations
display.toolNameMaxLengthnumber0Maximum displayed tool-name length. 0 keeps full names; MCP names may shorten to their final segment when truncating
display.toolsMaxVisiblenumber4Maximum completed tools shown on the tools line. 0 means unlimited
display.showAgentsbooleanfalseShow agents activity line
display.showTodosbooleanfalseShow todos progress line
display.showSessionNamebooleanfalseShow session slug or custom title from /rename
display.showAuthbooleanfalseShow the auth method (subscription plan) of the current login as its own segment at the end of the first line, e.g. Claude Max 20x. Derived from the oauthAccount block in {CLAUDE_CONFIG_DIR}.json; shows API Key when there is no OAuth login but ANTHROPIC_API_KEY is set
display.showAuthUserbooleanfalseShow the logged-in account (email local part, falling back to profile display name) next to the auth method
display.authUserLengthnumber8Maximum characters of the account name to display before truncating with . 0 shows the full name
display.showAdvisorbooleanfalseInline the model configured via Claude Code's /advisor on the project line, e.g. Advisor: Opus 4.7. Read from the advisorModel field that Claude Code stamps on each assistant transcript record; sanitised and capped at 64 chars before rendering
display.advisorOverridestring""Optional manual override for the displayed advisor label. When non-empty, replaces transcript-driven detection. Also sanitised and capped at 64 chars
display.showSessionStartDatebooleanfalseShow the transcript session start timestamp
display.showLastResponseAtbooleanfalseShow how long ago the last assistant response was written
display.showCompactionsbooleanfalseShow how many context compactions (manual /compact or auto) have occurred this session, counted from transcript compact_boundary entries, e.g. Compactions: 2. Hidden until the first compaction
display.showEffortLevelbooleanfalseShow the current reasoning effort in the model badge. Ultracode renders as ultracode(xhigh), detected from the session transcript so it tracks /effort changes made at runtime
display.effortFormatfull | symbol | textfullHow the effort renders when display.showEffortLevel is on: symbol and level text (◑ high), symbol only (), or level text only (high). Ultracode keeps the full ◕ ultracode(xhigh) form under symbol so the marker is not lost, and levels without a known symbol fall back to the level text
display.showClaudeCodeVersionbooleanfalseShow the installed Claude Code version, e.g. CC v2.1.81
display.showMemoryUsagebooleanfalseShow an approximate system RAM usage line in expanded layout
display.showPromptCachebooleanfalseShow the wall-clock time the session's prompt cache expires, read from the transcript
display.promptCacheTtlSecondsnumber300Compatibility fallback used only when the transcript has not reported a 5-minute or 1-hour cache tier
colors.contextcolor valuegreenBase color for the context bar and context percentage
colors.usagecolor valuebrightBlueBase color for usage bars and percentages below warning thresholds
colors.warningcolor valueyellowWarning color for context thresholds and usage warning text
colors.usageWarningcolor valuebrightMagentaWarning color for usage bars and percentages near their threshold
colors.criticalcolor valueredCritical color for limit-reached states and critical thresholds
colors.modelcolor valuecyanColor for the model badge such as [Opus]
colors.projectcolor valueyellowColor for the project path
colors.gitcolor valuemagentaColor for git wrapper text such as git:( and )
colors.gitBranchcolor valuecyanColor for the git branch and branch status text
colors.labelcolor valuedimColor for labels and secondary metadata such as Context, Usage, counts, and progress text
colors.customcolor value208Color for the optional custom line
colors.barFilledstringCharacter used for the filled portion of progress bars
colors.barEmptystringCharacter used for the empty portion of progress bars

colors.barFilled and colors.barEmpty accept a single visible grapheme. Control characters, invisible format characters (bidi controls, zero-width joiners, variation selectors), line/paragraph separators, and noncharacters are rejected. Wide characters (emoji, CJK) may affect bar alignment depending on the terminal.

Supported color names: dim, red, green, yellow, magenta, cyan, brightBlue, brightMagenta. You can also use a 256-color number (0-255) or hex (#rrggbb).

display.showMemoryUsage is fully opt-in and only renders in expanded layout. It reports approximate system RAM usage from the local machine, not precise memory pressure inside Claude Code or a specific process. The number may overstate actual pressure because reclaimable OS cache and buffers can still be counted as used memory.

display.showCost is fully opt-in. ClaudeHUD prefers the native cost.total_cost_usd field that Claude Code provides on stdin when it is available. If that field is absent or invalid for a direct Anthropic session, ClaudeHUD falls back to the existing local transcript-based estimate so the cost line still works on older payloads. The native field is absent before the first API response in a session, so the cost display may stay hidden until then. ClaudeHUD also keeps the cost hidden for known routed providers such as Bedrock and Vertex AI, because cloud-provider billed sessions may report $0.00 or omit the field even though the session was not literally free. Set display.showRoutedCost: true (alongside showCost) to opt into cost for those providers anyway: the native cost.total_cost_usd is shown as Cost when positive, otherwise ClaudeHUD falls back to a token-based Est. from the Anthropic pricing table.

display.showDailyCost is fully opt-in and answers a different question than showCost: what has the whole day cost across sessions, not just the current conversation. On each render ClaudeHUD folds the native cost.total_cost_usd into a small daily-cost.json ledger in the plugin data directory, keyed by session_id, and shows the day's cumulative spend as Today $12.34. The first sighting of a session records a baseline so only spend from that point counts, the counter resets at local midnight, sessions spanning midnight contribute only the current day's part, and entries unseen for more than 24 hours are dropped so the file stays bounded. It only uses the native field (no estimate fallback), so sessions that never render the statusline are not counted, counting starts when the option is enabled, and totals are per machine. Routed providers (Bedrock/Vertex) are excluded unless display.showRoutedCost is also enabled, matching showCost.

Official MiniMax Anthropic-compatible endpoints receive a MiniMax provider label. MiniMax M2.7 can use its published token and cache prices for local estimates; M3 pricing depends on each request's context tier, which cumulative session tokens cannot safely infer, so ClaudeHUD does not guess an M3 estimate.

display.showPromptCache is fully opt-in. When enabled, ClaudeHUD shows the wall-clock time the session's prompt cache expires (e.g. Cache ⏱ until 14:30), or expired once that time has passed. It follows display.hourCycle and display.showClockSeconds like every other clock time in the HUD. If the transcript has no main-session response yet, the cache element stays hidden.

It shows an expiry time rather than a countdown because the statusline only repaints while Claude Code is active. Between turns — exactly when the cache is draining — a countdown freezes at whatever it last displayed and keeps reporting it; a clock time stays true no matter how stal

Files in the repo

Repository payload27 top-level entries
  • .claude-plugin
  • .github
  • commands
  • dist
  • scripts
  • src
  • tests
  • .editorconfig
  • .gitignore
  • CHANGELOG.md
  • claude-hud-preview-16-9.png
  • claude-hud-preview-5-2.png
  • CLAUDE.md
  • CLAUDE.README.md
  • CODE_OF_CONDUCT.md
  • CONTRIBUTING.md
  • LICENSE
  • MAINTAINERS.md
  • package-lock.json
  • package.json
  • README.md
  • README.zh.md
  • RELEASING.md
  • SECURITY.md
  • SUPPORT.md
  • TESTING.md
  • tsconfig.json

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More plugins

Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.

138k
1 add

Graphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.

82k
code-yeongyu/
oh-my-openagent

OmO: Just type "mass ulw" keyword with your prompt. Now you are the master of graph engineering.

69k

Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More

94k

Opinionated Oxlint rules for rejecting low-evidence TypeScript and JavaScript patterns

4.3k