ctxmaster
Visualization layer for tokenmaster, the core context-budget metering and decision engine for LLM applications.
The hero surface is the context gauge: a zone-colored fill bar against the model's effective window with threshold ticks, and ancillary rows for context accounting, capacity provenance, token velocity, projected turns to exhaustion with a conservative bound, zone, reserved output, hidden overhead, and cache prefix. The gauge computes nothing itself; every number comes off tokenmaster's MeterState, and anyone can build an alternative visualizer against the same event stream.
Install
pip install ctxmaster
Quickstart
from tokenmaster import Meter
from ctxmaster import ContextGauge
meter = Meter.for_model("anthropic:claude-haiku-4-5")
gauge = ContextGauge()
gauge.attach(meter) # prints a fresh gauge on every recorded turn
meter.record({"input_tokens": 48_000, "output_tokens": 1_200})
For an in-place updating display in interactive sessions:
with gauge.live(meter):
... # record turns; the panel updates in place
A runnable demonstration lives at examples/demo_gauge.py in the
repository: a simulated agent accelerating from green into critical.
What is in 0.1.2
The terminal gauge with per-turn and live rendering, compatible with Tokenmaster 0.1 and 0.2. Planned next: the advice panel rendering tokenmaster recommendations with their rationale, a CLI, and dashboard surfaces. The npm and crates.io packages of the same name provide the matching raw-ANSI gauge with no dependencies beyond the core.
License
MIT
Metadata
Release files for ctxmaster 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 | |
|---|---|---|---|---|
| ctxmaster-0.1.2.tar.gz | 7.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ctxmaster-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.8 kB
Release files / ctxmaster-0.1.2.tar.gz
| Download URL | ctxmaster-0.1.2.tar.gz |
|---|---|
| Size | 7.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a747faf24bba2baa18496e835f34776b07b56d4a39f76bb9ed27e363be8dc612
|
|
BLAKE2b-256 checksum How to use checksums |
f0c145ccc381c6c31b7441c8b65d471dfc22c5a8222c0964c4b5513eb124219f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.2
|
Release files / ctxmaster-0.1.2-py3-none-any.whl
| Download URL | ctxmaster-0.1.2-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fbd9ce1a422b77262505b6ec8c07666b93c47eb414e065625e1860da4cc5643d
|
|
BLAKE2b-256 checksum How to use checksums |
cc2d16d666a075ba56a2fb05ed1fab84936dfb4fc358c085c7d67ea45cf19402
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.2
|
Security for ctxmaster 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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.