Skip to main content

Command Palette

Search for a command to run...

claude-statusline: a configurable status line for Claude Code

Published
3 min read
F
Open-source developer, creator of Doorkeeper (OAuth 2 for Ruby) and Elixir Toolbox. Building tools for developers for over a decade.

Claude Code lets you customize the status line at the bottom of your terminal. The default suggestion is a bash script, which works but gets clunky fast and difficult to maintain for more complex features.

There are other tools out there that solve this (more on that below), but none written in Go. I think Go is the right fit here: fast, compiles to a single binary, and cross-platform out of the box, given my setup uses Mac/Linux/Windows. I'm a big fan of Starship, and it heavily inspired the design: presets, format strings, per-module config and so on.

So I built claude-statusline:

claude-statusline screenshot

What it shows

The default format displays five modules:

format = "$directory | $git_branch | $model | $cost | $context"
  • directory: current working directory, truncated to the last 3 segments
  • git_branch: current branch, with an indicator when you're inside a git worktree
  • model: which Claude model is running
  • cost: session cost in USD, color-coded by thresholds (yellow at $1, red at $5)
  • context: context window usage as a progress bar with percentage (yellow at 50%, red at 90%)

There are two more modules disabled by default: session_timer and lines_changed. You can enable them in the config.

Themes

claude-statusline ships with 6 built-in presets:

PresetDescriptionNerd Font
defaultFlat with pipes, standard colorsNo
minimalClean spacing, no separatorsNo
pastel-powerlinePastel powerline arrowsYes
tokyo-nightDark blues with rounded powerlineYes
gruvbox-rainbowEarthy rainbow powerlineYes
catppuccinCatppuccin Mocha powerlineYes

To switch themes, set the preset field in your config:

preset = "tokyo-night"

Preview all of them with mock data:

claude-statusline themes

Making it your own

The config lives at ~/.config/claude-statusline/config.toml. You can start from a preset and override individual modules:

preset = "catppuccin"

[cost]
thresholds = [
  { above = 2.0, style = "yellow" },
  { above = 10.0, style = "red" },
]

[context]
bar_width = 10

Styles support named colors, hex values, 256-color codes, and attributes:

[model]
style = "fg:#11111b bg:#cba6f7 bold"

Rearranging the format string or adding inline styled text also works:

format = "$model | $directory | $git_branch | [$cost](dim)"

Installation

With Homebrew (recommended, keeps updates simple):

brew install felipeelias/tap/claude-statusline

Or with Go:

go install github.com/felipeelias/claude-statusline@latest

Then add it to your Claude Code settings (.claude/settings.json or global):

{
  "statusLine": {
    "type": "command",
    "command": "claude-statusline prompt"
  }
}

Generate a starter config with claude-statusline init, and use claude-statusline test to iterate on your config without running Claude Code.

Alternatives

The awesome-claude-code list has other options worth checking out: