r/npm • u/Downtown_Cat_7425 • 11h ago
Self Promotion contextpack-cli: zero-dependency CLI that packs a repo into a token-budgeted prompt for LLMs
I published contextpack-cli recently. It solves a problem I kept hitting: pasting a repo into an LLM one file at a time and blowing the context window on node_modules and lockfiles.
npm: https://www.npmjs.com/package/contextpack-cli Source: https://github.com/fadiuniv1/contextpack
Run it with `npx contextpack-cli . -o context.md`
It respects nested .gitignore and .ignore files, ranks source code above tests, redacts common secret formats, and supports --task, --diff, --profile and JSON output. Zero runtime dependencies, MIT licensed.
Honest caveat: token counts are local estimates (~±15%), not exact tokenizer counts. Feedback welcome.