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
Metadata
Release files for ctxline 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ctxline-0.1.2.tar.gz | 8.9 kB | With provenance | Details for ctxline-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ctxline-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for ctxline-0.1.2-py3-none-any.whl |
Total release size: 16.6 kB
Release files / ctxline-0.1.2.tar.gz
| Download URL | ctxline-0.1.2.tar.gz |
|---|---|
| Size | 8.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
064c032993c6c3647633856a7284a05bf505e49acc092998c2df13cd8f412e7c
|
|
BLAKE2b-256 checksum How to use checksums |
4feb52cea975f6e0632cb8660b5d41540ff9315a9246d565c21fd6b54400633b
|
| 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 logRelease files / ctxline-0.1.2-py3-none-any.whl
| Download URL | ctxline-0.1.2-py3-none-any.whl |
|---|---|
| Size | 7.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ab06ceb954be2601353ba8b6763d3f93cbeb2073c3b1006c66ff11dbdab4bf23
|
|
BLAKE2b-256 checksum How to use checksums |
b1f17c40130e339647686cf9cbed8b010fe8c9c41d948da4bb9b25169d634644
|
| 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 logSecurity for ctxline 0.1.2
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.
Attestation for ctxline-0.1.2.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 logA 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.