Skip to content

owittek/claude-statusline

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Claude Code Powerline Statusline

A powerline-style statusline for Claude Code, themed with Catppuccin Macchiato. Backgrounds are darkened for dark terminals; the accent foregrounds stay bright so they read well.

It shows the directory, git status, model, context-window usage, session cost, rate-limit budget, turn count, and time. Each sits in its own colored segment, and the usage segments change color as they fill up.

screenshot

Prerequisites

  • jq is required. The script parses Claude Code's JSON input with jq. Without it the statusline renders blank.
    • macOS: brew install jq. Debian/Ubuntu: apt install jq.
  • A Nerd Font is recommended. The segment icons are Material Design Icon glyphs from the Nerd Font range. Without a Nerd Font the statusline still works (text, colors, and percentages are all correct), but the icons show as missing-glyph boxes (□). Install any Nerd Font and select it in your terminal, or turn the icons off (see below).

No Nerd Font? Turn the icons off

Set STATUSLINE_ICONS=0 for a plain-text fallback with no glyphs and no boxes. The segments whose meaning isn't obvious get short text labels instead (ctx 82%, 5h 51%, turns 14); the rest read fine on their own. Add it to the command in settings.json:

{
  "statusLine": {
    "type": "command",
    "command": "STATUSLINE_ICONS=0 bash /Users/you/.claude/statusline.sh"
  }
}

Install

Quick install

From a clone of this repo, run the installer. It copies the script into your Claude config directory and merges the statusLine block into settings.json without touching your other settings:

./install.sh

Before overwriting anything, it backs up the file with a timestamped .bak copy: both settings.json and any existing statusline.sh at the destination. It also validates settings.json first and refuses to overwrite a different statusLine you already have unless you pass --force. Use --no-icons if your terminal has no Nerd Font, or --dir DIR for a non-default config directory. Run ./install.sh --help for details.

Manual install

  1. Save statusline.sh somewhere, e.g. ~/.claude/statusline.sh, and make it executable:

    chmod +x ~/.claude/statusline.sh
  2. Add the statusLine block to your ~/.claude/settings.json, pointing at wherever you saved the script. Use an absolute path:

    {
      "statusLine": {
        "type": "command",
        "command": "bash /Users/you/.claude/statusline.sh"
      }
    }
  3. Submit any input in Claude Code. The statusline re-runs every turn and picks up the change.

Segments

Segment Meaning
󰀵 name Current directory (basename)
󰘬 branch Git branch. + means staged changes, * means unstaged or untracked.
󰚩 model Active model, with the version suffix stripped
󰊪 NN% Context-window used. Green below 50, yellow from 50, red from 80.
󰄔 $N.NN Session cost in USD
⏱ NN% 5-hour rate-limit budget used. Blue, yellow from 50, red from 80.
󰭹 N Conversation turn count
󰅐 HH:MM Current time

Percentages are truncated, not rounded (82.9% shows as 82%), so a value never crosses a color threshold before it actually does.

Customizing

  • Colors sit near the top of the script as fg_* and bg_* RGB triples (Catppuccin Macchiato). Swap them for another palette.
  • Thresholds for the context and rate-limit colors are the -ge 80 and -ge 50 tests.
  • Icons are Material Design Icon glyphs, defined in the i_* variables near the bottom of the script. Replace any glyph there, or set STATUSLINE_ICONS=0 to drop them all for plain text.

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages