Skip to content

About

Claude Code status line: project, context window, session time and usage limits, with tmux-vitals integration

Topics

Resources

Stars

18 stars

Watchers

0 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

Repository files navigation

claude-code-statusline

English 🇺🇸 · Português 🇧🇷

screenshot

Status line for Claude Code: project and branch, context window, session time, usage limits.

  1. project (branch) +added -removed
  2. model context bar % · session time
  3. 5h N% reset · 7d N% reset — hidden inside tmux when tmux-vitals already shows it

Install

Let Claude install it

Paste this into a Claude Code session:

Install https://github.com/k8adev/claude-code-statusline as my status line:
clone it into ~/.claude/claude-code-statusline, point statusLine in
~/.claude/settings.json at its statusline.sh, and check that jq is installed.

Manual

git clone https://github.com/k8adev/claude-code-statusline ~/.claude/claude-code-statusline

~/.claude/settings.json:

{
  "statusLine": {
    "type": "command",
    "command": "bash ~/.claude/claude-code-statusline/statusline.sh"
  }
}

Requires bash, jq, git, a truecolor terminal and a Nerd Font.

Options

All via environment variables.

Variable Default Description
CLAUDE_STATUSLINE_LIMITS auto Line 3: auto (hide when tmux-vitals shows it), always, never
CLAUDE_STATUSLINE_CTX_WARN / _CTX_CRIT 30 / 60 Context bar turns yellow / red above these %
CLAUDE_STATUSLINE_LIMIT_WARN / _LIMIT_CRIT 50 / 80 Usage limits turn yellow / red above these %
CLAUDE_STATUSLINE_ICON_DIR U+F024B Folder icon
CLAUDE_STATUSLINE_ICON_CLOCK U+F0954 Session time icon
CLAUDE_STATUSLINE_ICON_RESET U+F0450 Reset countdown icon
CLAUDE_STATUSLINE_RL_CACHE ~/.claude/cache/rate-limits.json Where the rate limits are written for tmux-vitals

Icons are Nerd Font glyphs, given here by codepoint since GitHub can't render them; the screenshot shows how they look.

Context thresholds are low on purpose: Anthropic's best practices say performance degrades as the window fills, and used_percentage counts input tokens only.

Colors follow the Anthropic palette (Clay, Olive, Kraft, Deep).

License

MIT © k8adev. See LICENSE.

About

Claude Code status line: project, context window, session time and usage limits, with tmux-vitals integration

Topics

Resources

Stars

18 stars

Watchers

0 watching

Forks

Contributors

Languages