Skip to content

Releases

v1.7.0

Choose a tag to compare

@peterwkdev-creator peterwkdev-creator released this 24 Oct 00:48
  • A folder sum counts each response once: a resumed or forked session
    repeats the responses it came from in its own file, and those were counted
    twice. Its line says how many were already counted; --json adds
    "repeated".
  • A response with no message.id counts: its request id, its line's uuid
    or its line number takes the id's place. Before, only the first of them
    counted.
  • A file in a format this version does not know (no type, or assistant
    lines with no usage.input_tokens) prints a warning, instead of counting
    zero in silence. A field of the wrong type is skipped, not a traceback.
  • --budget lists a rule or CLAUDE.md that is a link to a file outside
    the repository, and does not read it.
  • --versions runs git with core.fsmonitor off, and looks up only
    absolute local paths: a relative path read another repository from the
    current folder, and a UNC path (//host/share) reached another machine.
    README and SECURITY say to read only your own transcripts with it.
  • Tests for a cut last line, an empty file, bytes that are not UTF-8, git
    missing from the PATH and a repository with no commit.
  • A folder of many projects is summed faster, with the same output.
  • The demo page source (vitrine/montar.py, its test and index.html) is
    in English.

v1.6.4

Choose a tag to compare

@peterwkdev-creator peterwkdev-creator released this 21 Oct 11:22
  • The demo page build also rejects an empty or non-text title, description
    or language, builds the page before creating the output folder, and keeps
    CRLF line endings in the HTML.
  • The Pages workflow jobs stop after 10 minutes.
  • No change in the library.

v1.6.3

Choose a tag to compare

@peterwkdev-creator peterwkdev-creator released this 11 Oct 21:19
  • The demo page is built with its language (English), title and description
    in the HTML itself, so screen readers and search engines get them before
    any script runs. No change in the library.

v1.6.2

Choose a tag to compare

@peterwkdev-creator peterwkdev-creator released this 11 Oct 20:53
  • A file with no responses (not a transcript, or the wrong file) prints what
    to give instead and exits with 1, instead of an empty table.
  • A folder given as the budget file, or a file that cannot be read, is an
    error message with exit code 2, not a traceback.
  • --example with a path and --budget --quiet --json are errors instead of
    silently ignoring an option.
  • Clearer output: the legend says what unattributed is; --versions says
    tokens is of one load; the bytes-per-token line and the skipped line
    say what they mean.
  • README: a shorter start (what it is, try it in a minute); "as Claude Code
    loads it" instead of "renders"; where a relative budget path starts.
  • Issue templates, the pull request template and CONTRIBUTING agree on where
    a missing case goes; claude-context-cost --version in the templates.

v1.6.1

Choose a tag to compare

@peterwkdev-creator peterwkdev-creator released this 11 Oct 19:55
  • README: badges for the PyPI version, the Python versions and the license,
    beside the tests badge, so PyPI shows them too.

v1.6.0

Choose a tag to compare

@peterwkdev-creator peterwkdev-creator released this 11 Oct 19:32

From a first use in another project's git hook:

  • --budget --quiet: only the verdict and the limits exceeded, for a hook.
  • --budget names the repository it measured, and says what a session also
    loads that it does not count: your ~/.claude/CLAUDE.md, memory and any
    CLAUDE.md above the repository. The README says which folder is measured
    and where the budget file's path starts.
  • The how column widens when a source has three ways, so the source
    column stays aligned.

v1.5.1

Choose a tag to compare

@peterwkdev-creator peterwkdev-creator released this 11 Oct 15:57
  • Clearer output: the legend explains every column (share, in, chars/4,
    error, how) and every today value of --versions; --steps says
    "start of the session or after a compaction" instead of "segment start".
  • --help ends with examples, where the transcripts are and a link to the
    README; error messages say what to give instead.
  • The README explains each kind of source and each how.
  • PyPI links as on GitHub: Homepage is the page, Source the repository.

v1.5.0

Choose a tag to compare

@peterwkdev-creator peterwkdev-creator released this 11 Oct 15:14
  • --versions: for one transcript, which git commit of each CLAUDE.md,
    rule and memory file the session loaded (the newest commit before the load
    with exactly that text, or the first one after it, marked (later)), and
    how today's file differs. Git is only read. --json adds versions;
    loaded_versions and Version in the API.
  • On the author's machine: of 2,863 distinct texts loaded, only 290 are the
    same on disk today; 811 were in git and the commit was found for 798 (the
    other 13 were never committed); none of the 212 texts equal today and in
    HEAD was missed (tests/test_corpus.py).
  • Budget fixes: nan and inf are not a ratio or a limit; a budget file
    that is missing or not UTF-8 exits with 2 and a message, not a traceback;
    every message names the budget file; an unquoted dotted pattern
    (CLAUDE.md = 1) is named whole; an import inside a ~~~ block is not
    followed; a Windows junction is not followed; --budget "" is an error.
  • Clearer output: "2 limits exceeded" instead of "passed", and a space after
    the loaded column.
  • The README's links, section links and image are absolute, so they work on
    PyPI too, and it shows the CI badge; the PyPI page links the demo and this
    changelog, and its description and keywords are the GitHub About and topics.
  • SECURITY.md: how to report a vulnerability privately, and what the tool
    does not do (no network, no writes). The CI's actions are pinned by commit.
  • Mutation: 51 mutants (24 in the budget, 10 in --versions); the tests
    catch all 51.

Install: pip install claude-context-cost==1.5.0

v1.4.0

Choose a tag to compare

@peterwkdev-creator peterwkdev-creator released this 11 Oct 14:25
  • Context budget for CI: claude-context-cost --budget context-budget.toml [repository] measures every CLAUDE.md, rule and @import Claude Code
    loads from a repository, as Claude Code renders them, and exits with 1 when
    a declared limit is passed (per file by glob pattern, and for the start-up
    total), with 2 when the budget file is invalid. --json works with it.
  • check_budget, Budget and BudgetError in the API.
  • On the author's machine the files found are the ones Claude Code loaded in
    257 of 257 start-ups and 252 of 252 on-demand loads, with the same bytes in
    268 of 268 files (tests/test_corpus.py).
  • Mutation: 36 mutants, 19 of them in the budget; the tests catch all 36.
  • CI checks the budget through the installed package too.

v1.3.1

Choose a tag to compare

@peterwkdev-creator peterwkdev-creator released this 11 Oct 13:10
  • Published on PyPI: pip install claude-context-cost. Each Release publishes
    through trusted publishing (OIDC), with no stored token, after the tests and
    a check of the installed package.
  • CI builds the package on every push, installs the wheel outside the checkout
    and runs the README example through the command and the API.
  • No change in the library.