Skip to main content

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

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. Shows worktree icon if in a worktree. And, 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.
6b Services Auth status for MCP services (green = authenticated, red = not): Notion MCP, Atlassian MCP, Figma MCP.

* Cost is estimated, and requires the cost tracking hook to function.

Detected languages

The branch segment appends an icon for the detected project language:

  • Terraform
  • Node.js
  • TypeScript
  • Python
  • Rust
  • Go
  • Java
  • Perl
  • Shell

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/*

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cc_statusline-0.1.0.tar.gz (16.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cc_statusline-0.1.0-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

Details for the file cc_statusline-0.1.0.tar.gz.

File metadata

  • Download URL: cc_statusline-0.1.0.tar.gz
  • Upload date:
  • Size: 16.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for cc_statusline-0.1.0.tar.gz
Algorithm Hash digest
SHA256 65ec860ceca8ee290268cf7a5c9cf8781c5c30f020ad182862db2e1ff7392315
MD5 237b72a105639fd6e1365aefd2a504a3
BLAKE2b-256 be4fe6a2f8afb89bb4a8033b94adf682ee81436bae4771568d85fc7ff96caf9d

See more details on using hashes here.

File details

Details for the file cc_statusline-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: cc_statusline-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for cc_statusline-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0031eb928ab0d52afe833a92af079cc66894b58eeb9f91120243f79888a60712
MD5 d040a7043a6536e95a000aafe48e6438
BLAKE2b-256 877bd9776bcd4bc07866c77cee1e17481ef0b9347086c4a6d6c859f5f70617b0

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

0.0.5

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page