Skip to main content

Claude Code statusline with real subscription usage data

Project description

Claude Vibeline

CI codecov PyPI Downloads Python License Built with Claude Code

A custom statusline for Claude Code that shows session details, prompt cache status, and real subscription usage data — designed for Pro, Max, and Team users.

Unlike token-based cost trackers, Claude Vibeline shows your actual rate limit utilization and reset countdowns as reported by Anthropic, alongside context window usage, effort level, and a live cache countdown.

my-project │ Opus 4.6 (high) │ cache ✓ 4m │ ctx 200k [###-----] 42% │
sess [##------] 19% 3h12m │ week [--------] 3% 5d20h │ extra 1.23/20€ 7d0h

Sections wrap to multiple lines based on --columns width, with a trailing to indicate continuation.

Note: This project was developed almost entirely through AI-assisted coding with Claude Code, with human oversight over all design decisions, architecture, and code review.

Features

From Claude Code's session data:

  • Project & model - project name, active model, and effort level (resolved from session transcript with settings.json fallback)
  • Context window - how much of the context window is used, with size indicator (e.g. 200k, 1M)
  • Prompt cache - tracks Anthropic's 5-minute prompt cache TTL for subscription users. Computed from user message timestamps in the session transcript, with a background countdown that refreshes without waiting for the next invocation:
    • ✓ 4m — cache is warm, 4 minutes remaining
    • ⚠ 47s — cache is warm but below the low-threshold warning
    • — cache has expired
    • ! prefix — cache expired between user messages earlier in the session (cache gap detected)

From Anthropic's OAuth API (subscription rate limits, not per-token costs):

  • Session limit - 5-hour rate limit utilization with reset countdown
  • Weekly limit - 7-day rate limit utilization with reset countdown
  • Per-model limits - weekly Opus and Sonnet limits with reset countdowns, shown when applicable
  • Extra usage - spend against your monthly extra usage cap with reset countdown, shown only if enabled

Every section is individually toggleable via CLI flags.

Installation

Available on PyPI. We recommend using uv.

To install:

uv tool install claude-vibeline

To update:

uv tool upgrade claude-vibeline

Setup

Add to ~/.claude/settings.json:

{
  // ...
  "statusLine": {
    "type": "command",
    "command": "claude-vibeline"
  }
}

Options

Flag Description
--columns N Terminal width in characters (default: 80)
--bar-width N Progress bar width in characters (default: 8)
--currency S Currency symbol for extra usage (default: )
--no-project Hide project name
--no-model Hide model and effort level
--no-cache Hide prompt cache status
--no-refresh Disable background cache timer refresh
--no-context Hide context window usage
--no-usage Skip fetching usage data entirely
--no-session Hide session (5h) usage
--no-weekly Hide weekly (7d) usage
--no-opus Hide weekly Opus usage
--no-sonnet Hide weekly Sonnet usage
--no-extra Hide extra usage spend
--debug Log each statusline output to debug file

Example with customizations:

{
  // ...
  "statusLine": {
    "type": "command",
    "command": "claude-vibeline --bar-width 5 --currency $ --no-cache --no-opus --no-sonnet"
  }
}
my-project │ Opus 4.6 (high) │ ctx 200k [##---] 42% │ sess [#----] 19% 3h12m │
week [-----] 3% 5d20h │ extra 1.23/20$ 7d0h

If everything fits on a single line, no trailing is shown.

Usage data

Usage data is fetched from an Anthropic OAuth endpoint (see Limitations). It requires a valid OAuth token from a Claude Pro, Max, or Team subscription.

Responses are cached locally for 60 seconds. Cached usage data is used when the token expires or the API is unavailable. If no token or cache exists, usage sections are omitted. Use --no-usage to disable API calls entirely.

Limitations

  • Undocumented APIs — the OAuth usage endpoint and the cache timer refresh mechanism are both undocumented and may break without notice.
  • Limited stdin data — the statusline process receives only a JSON blob on stdin. Claude Code's own CLI arguments (e.g. --model) and internal environment variables are not accessible.
  • Effort level is inferred — effort is not provided in stdin. It is resolved from the session transcript by scanning for /model and /effort commands, with a settings.json fallback shown with ? suffix. After session resume, effort resets to the ? fallback until /effort or /model is used.
  • No session fork support — transcript parsing does not distinguish between session forks. Multiple instances sharing a transcript will see each other's messages, and their session caches will race.

Development

Requires uv.

Clone and setup:

git clone https://github.com/hstojanovic/claude-vibeline.git
cd claude-vibeline
uv sync

Run checks:

uv run ruff format --check
uv run ruff check
uv run ty check
uv run pytest --cov

Build:

uv build

License

This project is licensed under the MIT license.


Claude Vibeline is an independent project and is not affiliated with or endorsed by Anthropic.

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

claude_vibeline-1.1.0.tar.gz (13.7 kB view details)

Uploaded Source

Built Distribution

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

claude_vibeline-1.1.0-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

Details for the file claude_vibeline-1.1.0.tar.gz.

File metadata

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

File hashes

Hashes for claude_vibeline-1.1.0.tar.gz
Algorithm Hash digest
SHA256 267bf343ad6475b60ff44b35817b533d9653441c5b0055bed8d7bc99d337e4d0
MD5 2509e4e55be29fc2263a2aeefc3ed051
BLAKE2b-256 7ed257098b1be1763542ed2baa04473be60b36a17ef3cf6fa0debf4f7b11160f

See more details on using hashes here.

Provenance

The following attestation bundles were made for claude_vibeline-1.1.0.tar.gz:

Publisher: publish.yml on hstojanovic/claude-vibeline

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

File details

Details for the file claude_vibeline-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for claude_vibeline-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f102e4e74cadd6f191dc410886a3255e9c24bd0961439380ec1c3fb519ef6cb7
MD5 3948201b04678939bde391cd0b5fac88
BLAKE2b-256 54b731e3f1f441d86b518cab406554890155bda69eda659f85b7e94297b85622

See more details on using hashes here.

Provenance

The following attestation bundles were made for claude_vibeline-1.1.0-py3-none-any.whl:

Publisher: publish.yml on hstojanovic/claude-vibeline

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