Claude Code Status Line
Introduction
Powerline-style status line for Claude Code.
Requires a Nerd Font installed and setup as your terminals default font.
Recommendation is to install either:
- FiraCode Nerd Font
- JetBrainsMono Nerd Font
Nerd Fonts 3.5.1 or newer is recommended. Earlier releases are missing some icons, such as Datadog.
If an icon renders blank, or as an unexpected glyph, upgrade your Nerd Font then restart your terminal.
Installation
pip install cc-statusline
On newer Linux systems, install with:
pip3 install --break-system-packages cc-statusline
It is recommended to install this status line with the cost tracking hook:
cc-costtrack
see cc-costtrack.
Configuration
Add to ~/.claude/settings.json:
{
"statusLine": {
"type": "command",
"command": "cc-statusline"
}
}
Upgrade
Upgrade with pip regularly:
pip install cc-statusline -U
On newer Linux systems, install with:
pip3 install --break-system-packages cc-statusline -U
Features
Segments
project > branch_name > ai_model > ctx% | tokens | cost > quota / usages / enterprise > cli | mcp
Example (Pro/Max plan):
my-app > feat/abc123 > Opus 4.6 > 12% | 58.3k | 1.42$ > 34% (2h05m) > 61% (4.2d) > cli | mcp
Example (Enterprise plan / Anthropic API key):
my-app > feat/abc123 > Opus 4.6 > 12% | 58.3k | 1.42$ > $78.50 22d > cli | mcp
Segment breakdown
| # | Segment | Description |
|---|---|---|
| 1 | Directory | Current working directory name. |
| 2 | Git branch | Branch name with color coding: red for main/master, yellow for staging, blue otherwise. |
| 2a | Git worktree | Shows worktree icon if in a worktree. |
| 2b | Language | Language icon, based on best guess. |
| 3 | Model | Active Claude model name. |
| 4 | Context | Context window usage: percentage, input tokens, and session cost (USD). Turns red at 80%+ usage. |
| 5a | Window quota | (Pro/Max only) 5-hour rolling usage percentage and time until reset. |
| 5b | Weekly quota | (Pro/Max only) 7-day usage percentage and time until reset. |
| 5c | Cumulative | (Enterprise / API key only) Monthly cumulative cost* (all sessions) and days remaining in billing period. |
| 6a | CLI Services | Auth status for CLI services (green = authenticated, red = not): GitHub CLI, Atlassian CLI, Notion CLI. |
| 6b | Services | Auth status for registered MCP services†: Notion, Atlassian, Figma, Datadog, Mixpanel, OpenTofu. |
* Cost is estimated, and requires the cost tracking hook to function.
† Only MCP services registered in .claude.json are shown. Services that need
no auth (OpenTofu) always show green.
Detected languages
The branch segment appends an icon for the detected project language:
- Terraform
- Node.js
- TypeScript
- Python
- Rust
- Go
- Java
- Ruby
- Perl
- Shell
- Docker
Caching
Data is cached at multiple tiers to keep the status line fast:
| TTL | Data |
|---|---|
| 1s | Git branch, stdin JSON (session data). |
| 10s | CLI/MCP auth status checks. |
| 60s | Directory name, language detection, monthly cost. |
| 5m | API rate limit usage (Pro/Max). |
Development
Set up a virtual environment:
python3 -m venv .venv
Activate the virtual environment before running any of the steps below:
source .venv/bin/activate
Testing
pip install -e ".[test]"
pytest
Build and publish
Build the distribution:
pip install -e ".[package]"
python -m build
This creates dist/ with .tar.gz and .whl files.
Configure Publishing to Pypi
Configure PyPI credentials in ~/.pypirc:
[distutils]
index-servers =
pypi
testpypi
[pypi]
username = __token__
password = pypi-<your-api-token>
[testpypi]
repository = https://test.pypi.org/legacy/
username = __token__
password = pypi-<your-test-api-token>
API tokens can be created at:
Alternatively, set credentials via environment variables instead of ~/.pypirc:
export TWINE_USERNAME=__token__
export TWINE_PASSWORD=pypi-<your-api-token>
To target TestPyPI, override the repository URL:
export TWINE_REPOSITORY_URL=https://test.pypi.org/legacy/
Publishing to Test Pypi
To publish to TestPyPI first:
pip install -e ".[package,publish]"
# Using ini file:
twine upload --repository testpypi dist/*
# Or, with environment variables:
export TWINE_REPOSITORY_URL=https://test.pypi.org/legacy/
twine upload dist/*
Publishing to Pypi
Publish to PyPI:
pip install -e ".[publish]"
twine upload dist/*
Metadata
Release files for cc-statusline 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cc_statusline-0.4.0.tar.gz | 19.4 kB | Without provenance | Details for cc_statusline-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cc_statusline-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for cc_statusline-0.4.0-py3-none-any.whl |
Total release size: 32.6 kB
Release files / cc_statusline-0.4.0.tar.gz
| Download URL | cc_statusline-0.4.0.tar.gz |
|---|---|
| Size | 19.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e52ad62c8630f20e3adc77e34dc737b740295ddbef4e794593e57fcd4a6fedfb
|
|
BLAKE2b-256 checksum How to use checksums |
915d959cce998183e80f716348ecac5d17d0936f800b7225edc634ef36c9382d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / cc_statusline-0.4.0-py3-none-any.whl
| Download URL | cc_statusline-0.4.0-py3-none-any.whl |
|---|---|
| Size | 13.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8dc02865a6e160deaf605b4759545315278a8520f288a83ff804cb229e04c90f
|
|
BLAKE2b-256 checksum How to use checksums |
f9f304313b75bafc33fa129d726462e1086c39dbe55e733630b4ee06c4e4e324
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Security for cc-statusline 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.