Skip to content

Customize your status line

The status line is a customizable bar that appears at the bottom of Claude Code. It runs any shell script you configure, receives JSON session data on stdin, and displays whatever your script prints — giving you a persistent, at-a-glance view of context usage, costs, git status, or anything else you want to track.

It’s useful when you want to:

  • Monitor context window usage as you work
  • Track session costs in real time
  • Keep the current git branch and status always visible
  • Distinguish between multiple open sessions

For the full reference — including all available JSON fields, multi-line output, colors, and Windows configuration — see the official status line documentation.


This is a ready-made status line that shows everything useful in one compact bar:

Status line showing git branch, model name, context bar, token count, session usage, cost, and lines changed

🌿 main ✔ │ 🤖 Sonnet 4.6 │ ctx ██░░░░░░ 14% │ 28.0k │ ⏱️ 3% ↺3h7m │ 💰$5.0789 │ +423 -55

What each segment shows:

SegmentDescription
🌿 main ✔Git branch + clean/dirty indicator
🤖 Sonnet 4.6Current model
ctx ██░░░░░░ 14%Context window usage bar
28.0kCurrent input token count
⏱️ 3% ↺3h7m5-hour rate limit used + time until reset
💰$5.0789Total session cost
+423 -55Lines added/removed this session

Requirements: jq and git must be installed. Colors require a terminal with ANSI 256-color support (most modern terminals qualify).


The easiest way is to let Claude Code set it up for you. Open Claude Code and run:

/statusline show git branch with clean/dirty indicator, model name, context usage bar with percentage, input tokens, 5-hour rate limit with reset timer, total session cost, and lines added/removed. Use ANSI 256 colors.

Claude Code will generate the script, write it to ~/.claude/, and update your settings.json automatically. Restart Claude Code for it to appear.


The easiest way to modify or remove your status line is to ask Claude Code directly using the /statusline command:

/statusline remove it
/statusline add the current date and time
/statusline show only model name and cost, no git info

Claude Code will update your script and settings.json accordingly. For manual edits, the /statusline official docs cover all available JSON fields and configuration options including multi-line output, colors, clickable links, and Windows support.