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

Releasing

Run the Publish workflow from GitHub (Actions → Publish → Run workflow), or from the terminal:

gh workflow run publish.yml -f bump=patch

Choose patch, minor or major. The workflow runs the tests, bumps the version in src/ctxline/__init__.py and package.json, commits to main, tags the release, publishes to PyPI and npm, and updates the Homebrew formula. Pull afterwards to get the version commit.

Metadata

Release files for ctxline 0.1.3

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.3
File Size Uploaded Provenance Actions
ctxline-0.1.3.tar.gz 9.1 kB With provenance Details for ctxline-0.1.3.tar.gz

Built distribution (wheel)

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

Total release size: 17.0 kB

Release files / ctxline-0.1.3.tar.gz

Download URL ctxline-0.1.3.tar.gz
Size 9.1 kB
Tags Source
SHA-256 checksum
How to use checksums
056cc1d19f9cf9580a1caaa7f3fda1c1bdee719729eb13f589cb72939f8f5600
BLAKE2b-256 checksum
How to use checksums
6bc47f308bf2f6f74709ee7c71d0460316ce3e5dca17f37fff8658a8d6507bf5
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.3-py3-none-any.whl

Download URL ctxline-0.1.3-py3-none-any.whl
Size 7.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
47fd1b99e517bc1102d28613d8098d336e0e28ea39817c54565f3e3b6c246aba
BLAKE2b-256 checksum
How to use checksums
eca55281f9f01cf8dcfa99baed280405b4191e5012d4e92f98a1581b036eae3d
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.3

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.3.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