Skip to main content

Enhanced status line for Claude Code

Project description

statusline

CI

Enhanced status line for Claude Code showing context usage, session time, and weekly budget.

What it does

screenshot

[Opus 4.6] | ๐ŸŒฟ main | ๐Ÿ“ statusline | ๐Ÿ’ฌ 249 | +24/-45 | ๐Ÿ’ฐ $7.36
Context:    โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–’โ–’โ–’โ–’โ–’โ–’โ–’โ–’โ–’โ–’โ–’โ–’ [49%] 98.4K/200.0K
Session:    โ–…โ–ˆโ–ƒโ–โ–‚โ–„โ–โ–โ–โ–โ–โ–โ–โ–โ–โ–โ–โ–โ–โ– [7%] 67.7M token (5am-10am)
Weekly:     โ–…โ–ƒโ–โ–‡โ–‚โ–‡โ–โ–โ–„โ–โ–†โ–ˆโ–โ–โ–โ–โ–โ–โ–โ– [42%] 3d0h24m, Extra: 7% $3.59/$50
  • Line 1: Model, git branch, directory, message count, lines changed, cost
  • Line 2: Context window token usage with progress bar and cache ratio
  • Line 3: Session sparkline with 5-hour utilization, token count, and time range
  • Line 4: Weekly sparkline with 7-day token distribution, remaining time, extra usage

Supports 1M context โ€” the model bracket shows (1M) when using extended context.

Key Features

Context Window Monitoring

  • Progress bar for token usage vs context window size (200K or 1M)
  • Fractional segments shown in dim color for partial fill
  • Color-coded warnings: yellow at 80%, red at 90%

5-Hour Session Blocks

  • Sparkline showing token consumption across 5-hour window (20 segments, 15min each)
  • API-derived time range (e.g., 5am-10am)
  • Total tokens consumed in the current block

Weekly Usage Tracking

  • Sparkline showing 7-day token distribution (20 segments, ~8.4h each)
  • Remaining time until weekly reset
  • Extra usage percentage and cost vs budget display

Responsive Layout

Automatically adapts to terminal width:

  • Full (โ‰ฅ55 cols): All details with full labels, graph width scales smoothly with terminal width
  • Compact (35โ€“54 cols): Abbreviated labels
  • Tight (<35 cols): Ultra-minimal display

Also adapts to terminal height โ€” switches to single-line minimal mode for short terminals.

Agent Teams Support

When running as a Claude Code team agent, displays a single-line format with agent name, model, and usage. Includes dead agent warnings (โš ๏ธ DEAD: agent-name) on the main terminal.

Schedule Integration

Line 1 can swap with a calendar event display showing upcoming events with time-based urgency coloring.

Installation

pip (recommended)

pip install ccsl
ccsl --setup

Homebrew (macOS)

brew install usedhonda/tap/ccsl
ccsl --setup

From source

git clone https://github.com/usedhonda/statusline.git
cd statusline
python3 install.py

Restart Claude Code. Done.

Requirements

  • Python 3.9+
  • Claude Code

Configuration

Display Options

Use --show to control which lines are displayed:

ccsl --show all      # All 4 lines (default)
ccsl --show simple   # Lines 2 and 3 only
ccsl --show 1,2      # Specific lines

Or edit the top of statusline.py:

SHOW_LINE1 = True   # Model / git / directory / cost
SHOW_LINE2 = True   # Context window usage
SHOW_LINE3 = True   # Session sparkline / tokens / time range
SHOW_LINE4 = True   # Weekly sparkline / remaining time / budget

Environment Variables

export STATUSLINE_DISPLAY_MODE=full   # Force display mode (full/compact/tight)
export STATUSLINE_NO_COLOR=1          # Disable colors
export CLAUDE_PROJECTS_DIR="/path"    # Custom projects directory

Errors logged to ~/.claude/statusline-error.log.

Project details


Download files

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

Source Distribution

ccsl-1.0.0.tar.gz (44.0 kB view details)

Uploaded Source

Built Distribution

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

ccsl-1.0.0-py3-none-any.whl (43.0 kB view details)

Uploaded Python 3

File details

Details for the file ccsl-1.0.0.tar.gz.

File metadata

  • Download URL: ccsl-1.0.0.tar.gz
  • Upload date:
  • Size: 44.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ccsl-1.0.0.tar.gz
Algorithm Hash digest
SHA256 875a45e544b6576e5681d7ee6d51d8404c92492e34de22bdc4c5c595c5e749f3
MD5 7beeee1ad0e3ae56b956b847782e4c01
BLAKE2b-256 e7842f3a2f1736449288ea85febd7b553fcbc9c4a74b2197481c1b9f898c2b5e

See more details on using hashes here.

Provenance

The following attestation bundles were made for ccsl-1.0.0.tar.gz:

Publisher: publish.yml on usedhonda/statusline

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ccsl-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: ccsl-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 43.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ccsl-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 032f0d62f1268db8643fe400ea4146bcb2085fd114416ac67b63402be24886e4
MD5 1e84649d20a1ccb574dd21f60f785ca3
BLAKE2b-256 b7ba7ee89f85aefacdc8f347a7b8aadbfdb90eda0100900a309f91eb6f0a2fc6

See more details on using hashes here.

Provenance

The following attestation bundles were made for ccsl-1.0.0-py3-none-any.whl:

Publisher: publish.yml on usedhonda/statusline

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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