convez.ai
Agente
maahumada

ccbar

maahumada/ccbar

Ver no GitHub
InicialPluginScore · de 0 a 100

See your parallel Claude Code agents — state + rate-limit usage — in your i3/polybar or waybar status bar.

Instalação

$npx convez-ai maahumada/ccbar

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
0
Forks
0
Acompanhando
0
Saúde
57%
Último commit
há 5 meses
Versão
—
Issues abertas
0
Contribuidores
1

README

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

ccbar

CI License: MIT Bars: polybar · waybar WMs: i3 · sway · hyprland

See your parallel Claude Code agents — their state and your rate-limit usage — right in your status bar.

Run several Claude Code sessions across your workspaces and ccbar gives you, at a glance: who's working, who's done, who's blocked waiting on you, plus how much of your 5-hour rate limit you've burned. Each badge can also show a topic icon that Haiku picks for the session.

⚠️ Pre-release (v0.x). Ships renderers for polybar (i3/X11) and waybar (Hyprland/Sway). The core is bar-agnostic — see the cache contract to wire your own.

How it works

ccbar splits cleanly into producers and consumers, coupled only by a small on-disk contract:

Claude Code hooks ─► core/ (producers) ─► ~/.cache/ccbar/ ─► renderers/ (your bar)
                                          (the contract)      └─ workspace resolver
                                                                 (i3 / sway / hyprland)
  • core/ — tiny scripts wired to Claude Code hooks + statusLine. They write agent state, an optional topic glyph, and your rate-limit snapshot to ~/.cache/ccbar/. Nothing bar-specific.
  • renderers/ — read that cache and draw a badge strip for your bar.
  • lib/workspace-resolver/ — the only WM-specific part: maps a session's terminal to its workspace (i3, Sway, Hyprland).

Anything that respects docs/cache-contract.md can render ccbar — in any language, for any bar.

States

GlyphStateWhen
◐workingbetween a prompt/tool-use and the next stop
●donefinished, waiting for your next prompt
○idledone for a while (decays after ~10 min)
▲blockedwaiting on a permission/elicitation prompt — never hidden

Quick start

Requires bash, jq, a Nerd Font for the glyphs, Claude Code, and one of: i3 (i3-msg + xprop), Sway (swaymsg), or Hyprland (hyprctl).

git clone https://github.com/maahumada/ccbar ~/.local/share/ccbar
cd ~/.local/share/ccbar
./install.sh --merge          # wires the hooks/statusLine into ~/.claude/settings.json (backs up)

Then add a module to your bar. polybar:

[module/claude_usage]
type = custom/script
exec = ~/.local/share/ccbar/renderers/polybar/usage.sh
interval = 5

[module/claude_agents]
type = custom/script
exec = ~/.local/share/ccbar/renderers/polybar/agents.sh
interval = 2

Add claude_usage / claude_agents to a bar's modules-*, restart polybar, and open claude in a couple of workspaces.

waybar (Hyprland/Sway) — merge the snippets from renderers/waybar/config.jsonc and style.css, then add the modules to a modules-* array:

"custom/claude_usage":  { "exec": "~/.local/share/ccbar/renderers/waybar/usage.sh",  "return-type": "json", "interval": 5 },
"custom/claude_agents": { "exec": "~/.local/share/ccbar/renderers/waybar/agents.sh", "return-type": "json", "interval": 2 }

Each module exposes a class (agent: the top state; usage: low/mid/high) you can color in CSS — see the example stylesheet.

Privacy & cost

The topic-icon feature (core/icon.sh) is opt-in. When enabled it makes one small Haiku call per session that sends the repo name, a README excerpt, and your first prompt to the model, and spends your own Claude tokens. The state and rate-limit features do not call any model and send nothing anywhere.

Turn icons off any time with CCBAR_DISABLE_ICONS=1, or just don't wire the icon.sh hook. Edit the topic taxonomy directly in core/icon.sh.

Configuration

VariableDefaultPurpose
CCBAR_CACHE${XDG_CACHE_HOME:-~/.cache}/ccbarCache location (shared by all components).
CCBAR_TERMINALSalacritty:kitty:wezterm-gui:foot:…Terminal comm names to detect.
CCBAR_WMautodetectedForce resolver: i3 | sway | hyprland.
CCBAR_DISABLE_ICONS01 disables the Haiku topic-icon call.

Contributing

New renderers (waybar, tmux, i3blocks…) and resolvers are very welcome — they only need to honor the cache contract. See CONTRIBUTING.md.

License

MIT

Ver o original no GitHub

Bom para

Relacionados