DEV Community

Felipe Philipp
Felipe Philipp

Posted on • Originally published at felipeelias.github.io on

claude-statusline: a configurable status line for Claude Code

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"

Enter fullscreen mode Exit fullscreen mode
  • 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:

Preset Description Nerd Font
default Flat with pipes, standard colors No
minimal Clean spacing, no separators No
pastel-powerline Pastel powerline arrows Yes
tokyo-night Dark blues with rounded powerline Yes
gruvbox-rainbow Earthy rainbow powerline Yes
catppuccin Catppuccin Mocha powerline Yes

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

preset = "tokyo-night"

Enter fullscreen mode Exit fullscreen mode

Preview all of them with mock data:

claude-statusline themes

Enter fullscreen mode Exit fullscreen mode

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

Enter fullscreen mode Exit fullscreen mode

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

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

Enter fullscreen mode Exit fullscreen mode

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

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

Enter fullscreen mode Exit fullscreen mode

Installation

With Homebrew (recommended, keeps updates simple):

brew install felipeelias/tap/claude-statusline

Enter fullscreen mode Exit fullscreen mode

Or with Go:

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

Enter fullscreen mode Exit fullscreen mode

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

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

Enter fullscreen mode Exit fullscreen mode

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:

Top comments (0)