Element guide

Claude Code statusline with rate limit

Visualize Claude Code's 5-hour and 7-day rate limit usage in your statusline before you bump into a soft cap.

Open the builder

Why show rate limits?

Claude Code reports rate-limit usage on `rate_limits.five_hour.used_percentage` and `rate_limits.seven_day.used_percentage`, plus reset timestamps. Pinning those numbers in your statusline turns a hidden quota into a visible signal — useful when you are deep into a batch of agentic edits and want to know whether you have room to keep pushing.

statusline.sh ships two element variants for each window. The `bar` variant renders an inline progress bar (configurable width, filled/empty chars). The `pct` variant prints just the percentage. Both share a hidden `showResetTime` flag that adds a `T-1h22m` countdown computed from the reset timestamp.

How it looks

The preview combines the model, a 5-hour bar in cyan, and a 7-day percentage in magenta. Either variant is conditional — if Claude Code does not emit rate-limit data in your session JSON, the element renders nothing and the statusline collapses around it.

How to add it

Open the builder, drag the Rate Limit 5h and/or 7d elements onto the canvas, and pick a variant from the inspector. The same hand-rolled compiler that lowers every other element to a `RenderOp[]` powers this one — what you see in the live preview is exactly what the installed bash and PowerShell scripts will render.

Keep exploring