https://github.com/daniel3303/ClaudeCodeStatusLine
Custom status line for Claude Code showing model, tokens, rate limits, and git info in real-time
https://github.com/daniel3303/ClaudeCodeStatusLine
anthropic claude claude-code cli developer-tools powershell rate-limiting shell status-line terminal
Last synced: 11 days ago
JSON representation
Custom status line for Claude Code showing model, tokens, rate limits, and git info in real-time
- Host: GitHub
- URL: https://github.com/daniel3303/ClaudeCodeStatusLine
- Owner: daniel3303
- Created: 2026-03-02T11:06:02.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2026-03-23T10:58:59.000Z (21 days ago)
- Last Synced: 2026-03-24T08:32:01.770Z (21 days ago)
- Topics: anthropic, claude, claude-code, cli, developer-tools, powershell, rate-limiting, shell, status-line, terminal
- Language: Shell
- Homepage: https://danielapoliveira.com
- Size: 336 KB
- Stars: 339
- Watchers: 5
- Forks: 27
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-claude-code - **ClaudeCodeStatusLine** - Custom status line for Claude Code showing model, tokens, rate limits, and git info in real-time. (📊 Usage & Observability)
README
# Claude Code Status Line
A custom status line for [Claude Code](https://claude.com/claude-code) that displays model info, token usage, rate limits, and reset times in a single compact line. It runs as an external shell command, so it does not slow down Claude Code or consume any extra tokens.
## Screenshot

## What it shows
| Segment | Description |
|---------|-------------|
| **Model** | Current model name (e.g., Opus 4.6) |
| **CWD@Branch** | Current folder name, git branch, and file changes (+/-) |
| **Tokens** | Used / total context window tokens (% used) |
| **Effort** | Reasoning effort level (low, med, high) |
| **5h** | 5-hour rate limit usage percentage and reset time |
| **7d** | 7-day rate limit usage percentage and reset time |
| **Extra** | Extra usage credits spent / limit (if enabled) |
| **Update** | Clickable link when a new version is available (checked every 24h) |
Usage percentages are color-coded: green (<50%) → yellow (≥50%) → orange (≥70%) → red (≥90%).
## Requirements
### macOS / Linux
- `jq` — for JSON parsing
- `curl` — for fetching usage data from the Anthropic API
- Claude Code with OAuth authentication (Pro/Max subscription)
### Windows
- PowerShell 5.1+ (included by default on Windows 10/11)
- `git` in PATH (for branch/diff info)
- Claude Code with OAuth authentication (Pro/Max subscription)
## Installation
### Quick setup (recommended)
Copy the contents of `statusline.sh` (or `statusline.ps1` on Windows) and paste it into Claude Code with the prompt:
> Use this script as my status bar
Claude Code will save the script and configure `settings.json` for you automatically.
### Manual setup — macOS / Linux
1. Copy the script to your Claude config directory:
```bash
cp statusline.sh ~/.claude/statusline.sh
chmod +x ~/.claude/statusline.sh
```
2. Add the status line config to `~/.claude/settings.json`:
```json
{
"statusLine": {
"type": "command",
"command": "~/.claude/statusline.sh"
}
}
```
3. Restart Claude Code.
### Manual setup — Windows
> **Windows users should use `statusline.ps1`** instead of the bash script.
1. Copy the script to your Claude config directory:
```powershell
Copy-Item statusline.ps1 "$env:USERPROFILE\.claude\statusline.ps1"
```
2. Add the status line config to `%USERPROFILE%\.claude\settings.json`:
**PowerShell / CMD:**
```json
{
"statusLine": {
"type": "command",
"command": "powershell -NoProfile -File \"%USERPROFILE%\\.claude\\statusline.ps1\""
}
}
```
**Git Bash / WSL bash:**
```json
{
"statusLine": {
"type": "command",
"command": "powershell -NoProfile -File \"$USERPROFILE\\.claude\\statusline.ps1\""
}
}
```
> **Note:** Use `%USERPROFILE%` in CMD/PowerShell or `$USERPROFILE` in bash shells. The `%VAR%` syntax does not expand in bash.
3. Restart Claude Code.
## Caching
Usage data from the Anthropic API is cached for 60 seconds at `/tmp/claude/statusline-usage-cache.json` to avoid excessive API calls.
## Update Notifications
The status line checks GitHub for new releases once every 24 hours. When a newer version is available, a second line appears below the status line showing the new version and a link to the repository. The check is cached at `/tmp/claude/statusline-version-cache.json` (or `%TEMP%\claude\...` on Windows) and fails silently if the API is unreachable or no release has been published.
## How to Update
When the status line shows an update is available, visit the [repository](https://github.com/daniel3303/ClaudeCodeStatusLine), copy the contents of `statusline.sh` (or `statusline.ps1` on Windows), and paste it into Claude Code with the prompt:
> Use this script as my status bar
Claude Code will replace the script and restart the status line automatically.
## License
MIT
## Author
Daniel Oliveira
[](https://danielapoliveira.com/)
[](https://x.com/daniel_not_nerd)
[](https://www.linkedin.com/in/daniel-ap-oliveira/)