Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

agent-statusline

One configurable statusline interface for Claude Code and Codex. Claude Code gets the full Rose Pine-themed renderer; Codex gets the closest equivalent supported by its native status line.


What it shows

The default plain style, running live

Segment Description
Directory Working directory, abbreviated to last 3 components
Branch Git branch + status flags (! modified, + staged, ? untracked)
Model Active Claude model
🧠 Context Context window usage bar — color shifts at 30%, 60%, 80%
⚡ Rate limit Five-hour rate limit bar + time until reset (e.g. ~3h58m)
💾 Cache Lifetime cache-read ratio from stats-cache.json
⏱ Duration Time elapsed since session start
Cost Session cost in USD (hidden at $0.00)
Lines Lines added/removed this session (hidden when both zero)

Requirements

  • Claude Code and/or Codex
  • bash 4+ (macOS ships bash 3; install via brew install bash)
  • jq and git for the Claude renderer
  • Python 3 for Codex configuration

Installation

git clone https://github.com/Memnoc/agent-statusline
cd agent-statusline
bash install.sh --harness claude  # claude | codex | both

With Claude Code, complete the two manual steps below. Codex is configured automatically in ~/.codex/config.toml.

1. Wire the renderer in ~/.claude/settings.json:

{
  "statusLine": {
    "type": "command",
    "command": "bash \"$HOME/.claude/statusline-command.sh\""
  }
}

2. Add to ~/.zshrc (prevents function/binary name collision):

statusline() { command statusline "$@"; }

Ensure ~/.local/bin is in PATH, then restart Claude Code.


Configuration

Shared config file: ~/.config/agent-statusline/statusline.conf (or $XDG_CONFIG_HOME/agent-statusline/statusline.conf). Existing ~/.claude/statusline.conf settings are migrated automatically during installation.

THEME="dawn"   # dawn | moon | main | catppuccin-latte | catppuccin-mocha
               # nord | gruvbox | tokyo-night | solarized
SIZE="full"    # full | small | minimal
STYLE="plain"  # plain | quiet | labelled | glyph

Use the statusline CLI from any terminal — or from inside Claude Code with ! statusline --help.

Themes:

statusline --themes                   # list all themes (* marks active)
statusline --theme nord               # switch to Nord
statusline --theme catppuccin-mocha   # switch to Catppuccin Mocha
statusline --theme dawn               # back to default

Styles:

statusline --styles           # list all styles (* marks active)
statusline --style quiet      # values only, dot separators
statusline --style labelled   # caps labels over aligned columns
statusline --style glyph      # text glyphs instead of emoji
statusline --style plain      # back to default

Size presets:

statusline --config full      # all segments, 10-block bars (default)
statusline --config small     # all segments, 5-block bars
statusline --config minimal   # directory + model + context only

When the Codex adapter is installed, these commands also update its native status line:

Preset Codex fields
full Directory, Git branch, model/reasoning, context used, five-hour limit, weekly limit
small Directory, model/reasoning, context used
minimal Model/reasoning, context used

Codex currently exposes fixed native fields rather than Claude Code's external-command hook. Consequently, themes, styles, custom icons, cache efficiency, cost, and diff data remain Claude-only. Restart Codex after changing a preset.

Segments:

statusline --segments          # list all segments and their state (* = off)
statusline --segment git:off   # hide git branch
statusline --segment cost:on   # show session cost

Other:

statusline --show    # print current config file
statusline --reset   # revert all settings to defaults

Themes

Theme Mode Palette
dawn light Rose Pine Dawn
moon dark Rose Pine Moon
main dark Rose Pine
catppuccin-latte light Catppuccin Latte
catppuccin-mocha dark Catppuccin Mocha
nord dark Nord
gruvbox dark Gruvbox Dark
tokyo-night dark Tokyo Night
solarized light Solarized Light

Styles

A theme picks the colours; a style picks how segments are drawn. Every style is foreground-only — none of them paint a background — so all four work with all nine themes, and the palette is untouched.

plain — emoji icons, block bars, pipe separators. The default, shown under What it shows above.

quiet — no icons, no bars, dot separators. Each bar becomes a short lowercase label and its percentage (ctx 27%), so colour carries the meaning.

Quiet style across all nine themes

labelled — a tiny caps label over each value, in columns sized to whichever of the pair is longer. Always two rows. The headers match the --segment names, so DIR, GIT and COST read the same as the toggles that control them.

Labelled style across all nine themes

glyph — text glyphs instead of emoji, thin ▰▱ bars, bracketed path. marks the branch and the elapsed time; the bars stand on their own. All standard Unicode, so it needs no Nerd Font and no emoji support.

Glyph style across all nine themes

Size presets

Preset Bars Segments
full 10 blocks All
small 5 blocks All
minimal 10 blocks Directory, model, context only

Segments

Each segment can be shown or hidden independently. At least one must remain on.

Name Description
dir Working directory
git Git branch and status flags
model Active model name
ctx Context window usage bar
rate Rate limit bar with reset countdown
cache Lifetime cache efficiency bar
duration Time since session start
cost Session cost in USD
diff Lines added/removed this session
caveman Caveman mode badge (if plugin active)

How it works

Claude Code supports a statusLine.type: "command" hook in settings.json. On every prompt, it pipes a JSON payload to your command and renders the stdout as the statusline. This script reads that payload for live session data (context usage, rate limits, cost, lines changed) and supplements it with data from local files (stats-cache.json for lifetime cache stats, sessions/*.json for session start time).

Codex exposes a native tui.status_line setting. The Codex adapter safely merges that setting into the existing TOML configuration and maps the same size presets onto supported native fields. It leaves all unrelated Codex settings intact.

Progress bars use Unicode block characters (█░, or ▰▱ in the glyph style) and ANSI 256-color codes, chosen from the active theme's palette. Themes and styles are independent: the theme supplies seven foreground colour roles, the style decides how segments are separated and whether they carry icons and bars.


License

MIT

About

Fully configurable statusline for Claude Code

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages