Skip to main content

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 rate limits — designed for Pro, Max, and Team users.

my-project │ Opus 4.8 (xhigh) │ cache ◷ 4m │ ctx 1M [###-----] 42% │
sess [##------] 19% 3h12m │ week [--------] 3% 5d20h

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 - 5-minute prompt cache TTL, shown as a live countdown
  • Session limit - 5-hour rate limit utilization with reset countdown
  • Weekly limit - 7-day rate limit utilization with reset countdown

Opt-in via --usage-api (from Anthropic's OAuth API):

  • Per-model limits - weekly Opus and Sonnet limits with reset countdowns
  • Extra usage - spend against your monthly extra usage cap with reset countdown

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

You don't have to track new releases — the statusline shows an update notification when a newer version is available on PyPI:

my-project │ Opus 4.8 (xhigh) │ ctx 1M [###-----] 42%
update available: 3.1.0 → 3.1.1 · uv tool upgrade claude-vibeline

PyPI is queried on the first render of a new session, and at most once per 24 hours overall. The cached latest version is reused on every render in between. Disable with --no-update.

The notification shares a second line below the statusline with error messages; errors take precedence when both apply.

Setup

Add to ~/.claude/settings.json:

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

refreshIntervalSeconds tells Claude Code to re-invoke the statusline at the given interval so the prompt cache countdown stays current.

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-context Hide context window usage
--no-session Hide session (5h) rate limit
--no-weekly Hide weekly (7d) rate limit
--usage-api Fetch per-model and extra usage from OAuth API (off by default)
--opus Show weekly Opus rate limit (requires --usage-api)
--sonnet Show weekly Sonnet rate limit (requires --usage-api)
--extra Show extra usage spend (requires --usage-api)
--no-update Hide update notification
--debug Log each statusline output to debug file

Context, session, and weekly flags also accept shorter forms: --no-ctx; --no-sess / --no-5h; --no-week / --no-7d.

Separately, -v / --version and -h / --help print the version and usage, then exit.

Example with all API sections enabled:

{
  // ...
  "statusLine": {
    "type": "command",
    "command": "claude-vibeline --usage-api --opus --sonnet --extra --currency $",
    "refreshIntervalSeconds": 30
  }
}
my-project │ Opus 4.8 (xhigh) │ cache ◷ 4m │ ctx 1M [###-----] 42% │
sess [##------] 19% 3h12m │ week [--------] 3% 5d20h │
opus [#-------] 10% 5d20h │ sonnet [--------] 2% 5d20h │
extra 1.23/20$ 7d0h

Rate limits

Stdin rate limits

Session and weekly limits are read directly from Claude Code's session data — no API call or authentication needed. Shown by default; disable with --no-session or --no-weekly.

OAuth API usage

Per-model and extra usage data is fetched from an undocumented Anthropic OAuth endpoint (see Limitations).

  • Requires a valid OAuth token from a Claude Pro, Max, or Team subscription.
  • Responses are cached locally for 60 seconds, and the cache is reused when the token expires or the API is unavailable.
  • If no token or cache exists, sections render as pending.
  • The API is only called when --usage-api is passed with at least one of --opus, --sonnet, or --extra.

Prompt cache

Tracks the 5-minute prompt cache TTL. Each user message or tool use result resets the timer. Computed from timestamps in the session transcript.

Status icons:

  • ◷ — warm
  • ⚠ — warm, but expiring soon
  • ✗ — expired
  • ↻ — expired at some point since the last user message (prefix)

The countdown is live (◷ 4m, ⚠ 47s, ✗ 0s), so set refreshIntervalSeconds in your statusline config to keep it current.

Pending and reset states

Segments with no data yet or with a rolled-over window always render their label rather than disappearing. Two placeholders distinguish the states:

  • — — pending. No data yet (fresh session before the first message, or API fetch failed with no cache). Applies to sess, week, cache, opus, sonnet, and extra.
  • ↻ — reset. The rate-limit window has rolled over and a fresh number is on the way. Applies to sess, week, opus, sonnet, and extra (new calendar month).

extra is the one exception: when the API reports is_enabled: false or omits the field (account has no extra usage configured), the segment is omitted entirely rather than rendered as pending.

Error messages

CLI parse errors (unknown flag, invalid value, missing argument), unexpected render failures, and malformed stdin JSON are shown on the same second line as update notifications, prefixed with the program name so it's unambiguous where the error comes from:

my-project │ Opus 4.8 (xhigh) │ ctx 1M [###-----] 42%
claude-vibeline: Unrecognized arguments: --bogus

The statusline still renders with defaults when the args are bad, so a bad flag no longer silences the output entirely. When stdin JSON is unparseable there is nothing to render and only the error message appears. Error messages are always shown — there is no opt-out.

Session data caching

Claude Vibeline caches per-session data to avoid redundant transcript parsing on every invocation. The cache stores:

  • Effort level — the resolved effort and the timestamp of the latest transcript entry processed, so subsequent invocations only scan new entries instead of re-reading the entire transcript.
  • Last user message timestamp — used by the prompt cache countdown as a fallback when the transcript cannot be read.

Stale session files (older than 30 days) are cleaned up whenever a new session writes its first cache entry.

All locally cached data (usage responses, session state, update check) is version-stamped and automatically invalidated on upgrade.

Limitations

  • Undocumented API — the OAuth usage endpoint is 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. After session resume, effort is shown with a ? suffix until /effort or /model is used.
  • No session fork support — forked sessions share a transcript file. The prompt cache countdown and effort detection may be inaccurate because messages from all forks are interleaved.
  • No subagent tracking — subagents run in separate sessions with their own prompt cache, but the statusline only tracks the main session's cache.

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

Pass --debug to log each statusline invocation as JSONL, including the stdin input, parsed arguments, resolved effort, usage data, and rendered output.

License

This project is licensed under the MIT license.


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

Metadata

Release files for claude-vibeline 3.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for claude-vibeline 3.3.0
File Size Uploaded
claude_vibeline-3.3.0.tar.gz 18.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for claude-vibeline 3.3.0
File Interpreter ABI Platform
claude_vibeline-3.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 41.3 kB

Release files / claude_vibeline-3.3.0.tar.gz

Download URL claude_vibeline-3.3.0.tar.gz
Size 18.1 kB
Tags Source
SHA-256 checksum
How to use checksums
350bafcdee0a40f608bab41c001a75ec19a539ba1ef76ab271c3407d580ee9f3
BLAKE2b-256 checksum
How to use checksums
8a29d14fecc8efe0cb4e4e276f3259dfdb8d09f6ff42d0c81cbef7f28a8447ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 11, 2026.

Transparency log

Release files / claude_vibeline-3.3.0-py3-none-any.whl

Download URL claude_vibeline-3.3.0-py3-none-any.whl
Size 23.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b8068e2314b0d7b3c29fa5d0183056e70029b742987502f313ea313ba46b1068
BLAKE2b-256 checksum
How to use checksums
1701d465e5279934bf25e6a320c2b85969eb38513e687d0e32155391bfe3be04
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 11, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

3.3.0 This release

2 release files

3.2.0

2 release files

3.1.1

2 release files

3.1.0

2 release files

3.0.0

2 release files

2.0.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page