Skip to content

About

Rank repository files against a task query and token budget.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

context-budgeter

context-budgeter scans a repository, ignores common generated directories, estimates tokens cheaply, ranks files for a task query, and writes a Markdown context budget report.

The token estimate is intentionally cheap and deterministic: roughly one token per four characters.

0.1.2 Highlights

  • Repository scans now skip individual text files above a configurable byte limit.
  • --max-file-bytes keeps logs, generated reports, and vendored text dumps out of context packs.

Usage

python -m context_budgeter /path/to/repo --query "fix oauth login" --budget 8000
python -m context_budgeter /path/to/repo --query "fix oauth login" --output context-report.md --recommend-ignore
python -m context_budgeter /path/to/repo --query "auth bug" --max-file-bytes 200000

Installed script:

context-budgeter /path/to/repo --query "billing retry bug" --budget 4000

Development

python -m unittest discover -s tests

No network calls are required by the test suite.

About

Rank repository files against a task query and token budget.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages