Skip to main content

ctxline

A status line for Claude Code that shows how much context you've used and how close you are to your usage limits.

Opus 5.5 · stovetime ⑂ main · ctx 186k (19%) · 5h 8%(3h) · wk 28%(2d) · $8.30
Field Meaning
Opus 5.5 The model
stovetime ⑂ main Folder and git branch
ctx 186k (19%) Tokens in the context window, and the share of the window they fill
5h 8%(3h) Share of your 5-hour limit used, and time until it resets
wk 28%(2d) Same for the weekly limit
$8.30 What the session would cost at API prices

Each field turns yellow when a quarter or less is left, and red at a tenth. Fields with no data yet are left out. The limits only appear on Pro, Max and Ultra plans, after the first reply in a session.

It uses no tokens. Claude Code runs it on your machine and sends it the session details as JSON. Nothing it prints goes to the model.

Install

With uv:

uv tool install ctxline
ctxline install

With pipx:

pipx install ctxline
ctxline install

With Homebrew:

brew install ericwafula/tools/ctxline
ctxline install

With Node 18 or newer:

npm install -g github:ericwafula/ctxline
ctxline install

ctxline install adds a statusLine entry to ~/.claude/settings.json, using the full path to the command so it works from the desktop app too. If you already had a status line, it's saved to ~/.claude/ctxline-previous.json.

The Node version records the path of the Node it was installed with. If you remove that Node version (with nvm, say), run ctxline install again.

Remove

ctxline uninstall

This puts back the status line you had before, or removes the entry if there wasn't one. Then uninstall the package with uv tool uninstall ctxline, pipx uninstall ctxline, brew uninstall ctxline or npm uninstall -g ctxline.

Try it without Claude Code

echo '{"model":{"display_name":"Opus"},"context_window":{"total_input_tokens":42000,"context_window_size":200000}}' | ctxline

Set NO_COLOR=1 for plain text. CLAUDE_CONFIG_DIR changes where settings are written.

Development

The Python version lives in src/ctxline, the Node version in lib and bin. Both are tested against the same cases in tests/fixtures/cases.json, so they print identical lines.

python3 -m unittest discover -s tests
npm test

Metadata

Release files for ctxline 0.1.1

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

Source distribution (sdist)

Source distribution for ctxline 0.1.1
File Size Uploaded Provenance Actions
ctxline-0.1.1.tar.gz 8.9 kB With provenance Details for ctxline-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ctxline 0.1.1
File Interpreter ABI Platform Actions
ctxline-0.1.1-py3-none-any.whl Python 3 none any Details for ctxline-0.1.1-py3-none-any.whl

Total release size: 16.6 kB

Release files / ctxline-0.1.1.tar.gz

Download URL ctxline-0.1.1.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
acee05a11dee0548ccb708a90e83f2eb49b500d824694ac33f3b2bb70fbe61dd
BLAKE2b-256 checksum
How to use checksums
71d578abfe5798e9988e00ab7a0999087fb991879a00179d5a2b22c71e38d1b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 26, 2026.

Transparency log

Release files / ctxline-0.1.1-py3-none-any.whl

Download URL ctxline-0.1.1-py3-none-any.whl
Size 7.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
63e23a39c79f4e2f73bc8cd73120a796541d18232d45b8aeceb53750dd096708
BLAKE2b-256 checksum
How to use checksums
63c3012f476738a36cb78914a5d04b73da8f5da69b79d6acddc5d4a3c7bc5be9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 26, 2026.

Transparency log

Security for ctxline 0.1.1

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ctxline-0.1.1.tar.gz

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 Nov 26, 2026.

Transparency log

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.

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