Packing a repository into a model's context is a move that either works or wastes the whole window, and you normally find out which after it is too late. Splitting the estimate from the retrieval turns that into a decision: check the token count, add an ignore pattern or compression, check again, then pull. The directory restriction is worth noting too — the server cannot read outside where it was started, which makes it safe to leave connected.
A wrapper around repomix that adds the step people usually skip: measuring first. One tool estimates how large the packed output will be, the other actually returns it, and both take the same parameters — so you can check the size, adjust the include patterns or turn on compression, and only then spend the context. Local paths and remote repository URLs both work.
- `repomix-estimate` reports output size in KB or MB and an estimated token count, without returning the content
- `repomix` packs the repository and returns the file contents
- `include` and `ignore` glob patterns to keep tests, builds and vendor directories out
- `compress` to cut the token count on a large repository
- `style` to choose `xml`, `markdown` or `plain` output
- `remote` to pack a repository URL you have not cloned
Node and a build from the repository: `npm install` then `npm run build`, and point your client at `dist/index.js` — or add it in Claude Code with `claude mcp add`. No account and no key. File access is restricted to the directory the server was started from, so paths outside it are refused; output files are written to the system temporary directory and cleaned up after the contents are returned.
