Skip to content

ContextCost v0.2.0 — consumer-aware context auditing

Choose a tag to compare

@github-actions github-actions released this 11 Aug 09:51
· 58 commits to main since this release
4a80fbb

ContextCost now measures the file-selection boundary of the AI tool you actually use, instead of assuming every tool sees the same .gitignore view.

Install

python -m pip install --upgrade contextcost
contextcost --consumer cursor

No runtime dependencies; Python 3.9–3.14.

What is new

  • --consumer cursor|aider|repomix|generic applies each consumer's documented ignore inputs.
  • --write-ignore writes the re-measured proposal to .cursorignore, .aiderignore, .repomixignore, or .gitignore.
  • Terminal and JSON output name the selected consumer, active ignore inputs, and write destination.
  • python -m contextcost is now a supported entry point.
  • Write mode refuses symbolic-link destinations rather than following them outside the repository.
  • Public v0.1 dataclass positional construction and --write-gitignore remain compatible.

Important boundary

A consumer profile estimates the text files eligible for context after documented ignore files. It does not reproduce proprietary semantic retrieval, compression, repo maps, tokenizers, prompts, or the bill for one live request. A “candidate context waste” finding is task-dependent: lockfiles can be essential for dependency upgrades even though they are machine-generated.

Verification

  • 110 tests across Linux, Windows, macOS and Python 3.9–3.14
  • CodeQL, lint, format, README generation, package build, and tokenizer calibration passed on the tagged commit
  • published wheel and sdist pass strict metadata checks
  • GitHub and PyPI artifacts are byte-identical
  • SHA256SUMS and GitHub build-provenance attestations are attached

SHA-256:

  • wheel: b980245e22bae4efbf34813937c7d2349ff673b942793120aa7c4e62e4512faf
  • sdist: 2b78f58881fbfb6c2edc0b8962e5d231bb31d15fe6fb4e9781e241e7b28e2a70

Full changelog: v0.1.0...v0.2.0