How to customize the Claude Code status line

The status line is the row at the bottom of Claude Code. You can fill it with your own shell script, or install a mod that adds the model, git branch, cost, context usage or a timer for you.

Updated

The fast way: /statusline

Describe what you want and Claude Code writes the script and the setting for you:

Claude Code
/statusline show model name and context percentage with a progress bar

It saves a script in ~/.claude/ and points your settings at it. To get rid of it, run /statusline clear.

By hand: a script in settings.json

Add a statusLine entry to ~/.claude/settings.json:

settings.json
{
  "statusLine": {
    "type": "command",
    "command": "~/.claude/statusline.sh"
  }
}

Claude Code runs the script and sends it the session as JSON on stdin: the model, the working directory, context window usage, cost and more. Whatever the script prints shows up in the status line. It runs on your machine and costs no tokens.

You don't need a separate file for something small. This jq one-liner works as the command:

command
jq -r '"[\(.model.display_name)] \(.context_window.used_percentage // 0)% context"'

Anthropic's status line docs list every field you get.

With a status line mod

A script prints text each time Claude Code asks for it. A mod runs inside Claude Code, so it can count tool calls, read each request's token usage, and update its entry the moment something changes. One mod can also bring a pane or a slash command along with its status line entry.

A few people write their own and share them. These have the most stars on GitHub:

All status line mods

Script or mod?

  • Write a script if you already have one, or if one line of text is all you want. Nothing to install.
  • Install a mod if you'd rather not write anything, or if you want the status line to react to what Claude does during a turn.

Token and cost trackers live in their own category, Usage & cost. Many of them also put a number in the status line.