convez.ai
PluginProdutividadeIniciante
matheustimbo

Status Line para Claude Code

matheustimbo/claude-status-line

Monitore modelo, contexto e rate limits sem sair do terminal

Ver no GitHub
InicialPluginScore · de 0 a 100

Plugin que exibe em tempo real o modelo ativo, nível de esforço, branch/worktree do git, uso de contexto e rate limits (sessão 5h e semanal 7d) com cores e contagem regressiva para reset. Instalação com uma linha de comando.

Instalação

$npx convez-ai matheustimbo/claude-status-line

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
1
Forks
0
Acompanhando
0
Saúde
42%
Último commit
há 1 mês
Versão
—
Issues abertas
0
Contribuidores
2

Casos de uso

  • Acompanhar consumo de rate limits em sessões longas
  • Visualizar uso de contexto para saber quando compactar
  • Identificar branch e worktree atual sem deixar o editor

Veredito

Plugin útil e bem executado para quem usa Claude Code regularmente. Reduz fricção ao manter informações críticas visíveis sem consumir tokens ou APIs.

README

A tradução para o português deste README ainda está na fila.

📊 claude-status-line

A status line for Claude Code — always know your model, git branch/worktree, and how much of your rate limits is left, without leaving the terminal.

One-line install Shell License PT-BR

EN · PT-BR


Shows the active model, current effort level, current git branch and worktree, context window usage, and rate limits (5-hour session and 7-day weekly), with colors and time until reset:

Opus 4.8 (1M context) (effort high) | 🌿 main | Context: 6% | Session: 13% (resets in 3h 19min) | Weekly: 18% (resets in 5d 13h)

In a secondary git worktree, the worktree name (📁) appears in parentheses next to the branch (🌿):

Opus 4.8 (1M context) (effort high) | 🌿 feature-x (📁 my-worktree) | Context: 6% | Session: 13% (resets in 3h 19min) | Weekly: 18% (resets in 5d 13h)

No special font required — it works in any terminal.

🟢 green (<50%) · 🟡 yellow (<80%) · 🔴 red (≥80%)

Labels follow your system language (Portuguese or English), and fall back to English otherwise. Force one with STATUSLINE_LANG — see Configuration.

✨ Why?

  • ⏱️ Never get surprised by a rate limit again — see session and weekly usage in real time, with a countdown to reset
  • 🧠 Context always visible — know when it's time to compact
  • 🌿 Branch & worktree at a glance — always know which branch (and worktree) you're working in
  • 🪶 Zero cost — no API, no tokens; everything rendered locally, negligible CPU even with 10+ windows open

📦 Requirements

  • bash, curl
  • jq — brew install jq (macOS) or apt install jq (Linux)

🚀 One-line install

curl -fsSL https://raw.githubusercontent.com/matheustimbo/claude-status-line/main/install.sh | bash

Then restart Claude Code. The installer downloads the script to ~/.claude/statusline-command.sh and adds the statusLine block to your ~/.claude/settings.json (preserving any existing config).

The default uses refreshInterval: 5 (refresh every 5s — useful when you have multiple terminals running in parallel and want the line to be fresh when you switch windows). Override via env var:

REFRESH_INTERVAL=10 curl -fsSL https://raw.githubusercontent.com/matheustimbo/claude-status-line/main/install.sh | bash

Manual install

  1. Download the script to ~/.claude/:

    curl -o ~/.claude/statusline-command.sh \
      https://raw.githubusercontent.com/matheustimbo/claude-status-line/main/statusline-command.sh
    chmod +x ~/.claude/statusline-command.sh
    
  2. Add the statusLine block to your ~/.claude/settings.json:

    {
      "statusLine": {
        "type": "command",
        "command": "bash ~/.claude/statusline-command.sh"
      }
    }
    
  3. Restart Claude Code.

🎛️ Configuration

The status line is configured via environment variables in the command of your ~/.claude/settings.json. Chain as many as you like:

{
  "statusLine": {
    "type": "command",
    "command": "STATUSLINE_LANG=en SHOW_WEEKLY=0 bash ~/.claude/statusline-command.sh"
  }
}

Language — STATUSLINE_LANG: pt or en. Defaults to your system language (from LANG/LC_* or macOS AppleLocale), falling back to English if it isn't supported.

Core sections — shown by default; set to 0 to hide:

VariableSection
SHOW_MODELModel name
SHOW_EFFORTEffort level (next to model)
SHOW_GITGit branch / worktree
SHOW_CONTEXTContext window usage
SHOW_SESSION5-hour session rate limit
SHOW_WEEKLY7-day weekly rate limit

Extra sections — hidden by default; set to 1 to show:

VariableSection
SHOW_COSTSession cost in USD (e.g. $0.42)
SHOW_GIT_AHEADAhead/behind vs upstream (e.g. ↑2 ↓1)
SHOW_CONTEXT_WARNPrefixes a ⚠️ when context usage is high
CONTEXT_WARN_ATThreshold (%) for the context warning (default 80)

Appearance — defaults keep the current look:

VariableEffect
STATUSLINE_SEPSeparator between sections (default |), e.g. STATUSLINE_SEP=" • "
STATUSLINE_ORDERCustom section order, comma-separated keys: model,git,context,session,weekly,cost
STATUSLINE_THEMEdark (default) or light (colors tuned for light backgrounds)
STATUSLINE_WIDTHForce the width used for line wrapping. Empty = auto-detect (COLUMNS/tput); 0 = never wrap

Sections wrap onto multiple lines when they don't fit the terminal width. Set STATUSLINE_WIDTH=0 to keep everything on a single line, or to a number to override the detected width.

⚙️ How it works

Claude Code pipes a JSON payload via stdin to the status line command on every render, containing model, effort, workspace, context_window, rate_limits, and cost. The script parses it with jq (and shells out to git for the branch/worktree) and prints a formatted line with ANSI colors. That's it — a single bash file, easy to customize.

📄 License

MIT — use, modify, and share freely.


Made with ☕ by @matheustimbo — if this helped you, drop a ⭐!

Ver o original no GitHub

Bom para

Relacionados