DevTools · Open source Live

claude-quota-statusline

See your Claude Code quota in real time, right in your terminal.

Install
curl -fsSL https://raw.githubusercontent.com/codecoincognition/claude-quota-statusline/main/install.sh | bash
Example output
⟡ 5h: 67% │ 7d: 20%

What it does

claude-quota-statusline is a terminal status bar integration for Claude Code that shows your API quota usage in real time. It displays two rolling usage percentages — the 5-hour window and the 7-day window — directly in your terminal status bar, updated automatically after every Claude response. No manual refresh, no tab switching, no guessing.

The display is color-coded for glanceability: green when usage is under 80% (normal), yellow when usage reaches 80–94% (approaching limit), and red when usage is 95% or above (near limit). Two display modes are available: compact text format (⟡ 5h: 67% │ 7d: 20%) and progress bar format (⟡ 5h: ███████░░░ 67%).

It uses Claude Code's built-in statusLine hook — a shell command that runs after each assistant response and displays its output in the status bar. The script parses the rate_limits fields from Claude Code's JSON output. No tokens are consumed, no external services are called, and no data leaves your machine.

Features

Always-on quota, zero friction.

Real-time quota

Shows 5-hour and 7-day rolling usage percentages in your terminal status bar. Updates automatically after every Claude Code response — no manual action needed.

Color-coded alerts

Green under 80%, yellow at 80–94%, red at 95%+. Glanceable status without interrupting your development flow or leaving the terminal.

Two display modes

Compact text mode: ⟡ 5h: 67% │ 7d: 20%. Visual progress bar mode: ⟡ 5h: ███████░░░ 67%. Switch by editing a single variable.

Zero configuration

One install command. The script handles everything: copies the script, configures Claude Code's settings.json, and installs jq automatically if not present.

How it works

Install once. Never miss a quota wall again.

01

Run the install script

The script copies quota-statusline.sh to ~/.claude/ and adds the statusLine configuration to ~/.claude/settings.json. jq is installed automatically if not present.

02

Restart Claude Code

Restart Claude Code. The status bar at the bottom of your terminal now shows live quota percentages for both the 5-hour and 7-day rolling windows.

03

Work normally

Use Claude Code as usual. After each response, the status bar updates automatically with your current usage. No commands to run, no tabs to check.

04

Switch display modes

Edit ~/.claude/quota-statusline.sh and set MODE=bar for progress bars or MODE=text for compact text format.

FAQ

Frequently asked questions.

What is claude-quota-statusline? +

claude-quota-statusline is a terminal status bar integration for Claude Code that displays your 5-hour and 7-day rolling quota usage as percentages in real time. It updates automatically after each Claude response and shows color-coded status: green under 80%, yellow at 80–94%, red at 95% or above.

How do I install claude-quota-statusline? +

Run: curl -fsSL https://raw.githubusercontent.com/codecoincognition/claude-quota-statusline/main/install.sh | bash. The script copies quota-statusline.sh to ~/.claude/ and configures the statusLine setting in ~/.claude/settings.json. jq is installed automatically if not present. Restart Claude Code to activate.

What do the 5-hour and 7-day windows mean? +

Claude Code enforces rate limits on two rolling time windows: a 5-hour window that limits short-term burst usage, and a 7-day window that limits sustained usage over the week. claude-quota-statusline shows your current consumption as a percentage of each limit so you can see both at a glance.

How does it update automatically? +

It uses Claude Code's built-in statusLine hook. After each assistant response, Claude Code executes the configured shell command and displays the result in the terminal status bar. claude-quota-statusline parses the rate_limits data from Claude Code's JSON output and formats it for display.

What terminal emulators does it support? +

It works in any terminal emulator that Claude Code's statusLine feature supports, including macOS Terminal, iTerm2, and most modern terminal emulators. Color output requires ANSI color support, which is standard in all modern terminals.

What do the colors mean? +

Green means your quota usage is under 80% — normal range. Yellow means 80–94% — approaching the limit, worth monitoring. Red means 95% or above — near the limit, Claude Code may start rate-limiting responses soon.