Claude Code status line

claude-code-statusline

A dense status line with a gradient progress bar, git status and cost tracking that hides fields when not needed.

199 stars 31 forksStatus lines Source

Install

From source
git clone https://github.com/kcchien/claude-code-statusline.git

From the README

◆ claude-code-statusline

English | 繁體中文

A beautiful, information-dense status line for Claude Code — the CLI tool by Anthropic.

Turn the blank status bar into a real-time dashboard: model, context usage with gradient progress bar, cost, duration, git branch, rate limits, and more.

Preview

Normal — Context at 42%, everything is fine

Warning — Context at 75%, pay attention

Danger — Context at 92%, almost full

Startup — Clean, no noise

Features

Installation

Prerequisites

- Claude Code installed
- jq — install with brew install jq (macOS) or apt install jq (Linux)

Quick install

Manual install

Add this to your settings.json:

Restart Claude Code. The status line appears after your first interaction.

Configuration

All configuration is via environment variables. Add them to your ~/.zshrc or ~/.bashrc:

Example:

How it works

Claude Code's statusLine hook sends a JSON payload to your script via stdin after every assistant response. The JSON contains the full session state — model, tokens, cost, git info, rate limits, etc.

This script:

1. Single jq call (~3ms) — parses all 14 fields at once
2. Git cache (~0ms on cache hit, ~40ms on refresh) — dirty check cached for 5 seconds in /tmp/
3. Smart assembly — only non-zero sections are rendered
4. printf '%b' — interprets ANSI escape codes for the final colored output

Total: < 50ms end-to-end.

Available data from Claude Code

The status line receives these JSON fields:

- model.display_name — current model
- context_window.used_percentage — context usage (0-100)
- cost.total_cost_usd — session cost
- cost.total_duration_ms — elapsed time
- cost.total_lines_added/removed — code changes
- rate_limits.five_hour/seven_day.used_percentage — rate limits
- worktree.branch/name — git worktree info
- agent.name —…
Read the full README on GitHub

How status lines work

  • A status line is a command Claude Code runs to draw the bar under the prompt. It gets the session as JSON on stdin (model, folder, cost, context) and prints one or more lines.
  • Point the statusLine setting in ~/.claude/settings.json at it: { "statusLine": { "type": "command", "command": "<the command from the README>" } }.
  • Or run /statusline inside Claude Code and describe what you want.
Claude Code docs

Details

Language
Shell
License
MIT
Last updated
24 March 2026

FAQ

What is claude-code-statusline?

A dense status line with a gradient progress bar, git status and cost tracking that hides fields when not needed. It is a status line for Claude Code, from kcchien/claude-code-statusline on GitHub.

How do I install claude-code-statusline?

Clone kcchien/claude-code-statusline from GitHub and follow the setup steps in its README.

Is claude-code-statusline popular?

kcchien/claude-code-statusline has 199 GitHub stars and 31 forks. It was last updated on 24 March 2026.

More status lines

Browse the most popular Claude Code mods, all status lines, or the skills and MCP server directories.