Built a quick, sub-15ms Rust CLI/TUI to pack repos into prompts without burning 40k tokens on lockfiles and junk
Mirrored from r/LocalLLaMA for archival readability. Support the source by reading on the original site.
Whenever I feed codebases into local models (Qwen, DeepSeek R1) or API models, the biggest annoyance is prompt pollution:
- Lockfiles (`Cargo.lock`, `package-lock.json`) burning 30,000+ tokens for zero reason.
- SVGs, binary files, or build artifacts slipping into the context.
- Existing packers taking 3-4 seconds just to generate the prompt.
I built a small tool called repOx to fix this for my own workflow.
GitHub: https://github.com/WVDYC/repOx
Features:
- Speed: Written in Rust, takes ~14ms to dump a 3k-file repo.
- Lazygit-style TUI (`repox -i`): Opens a fast terminal UI where you can uncheck folders with Space, preview files, search with `/`, and watch a live token gauge before copying.
- Clean output: Strips lockfiles and binaries by default using Git NUL-byte heuristics. Dumps straight to clipboard (`repox -c`).
- Offline Tokenizer: Supports token budgets for Claude, GPT, Gemini, DeepSeek, and Llama contexts so you know beforehand if you're exceeding your window.
One-line install (macOS / Linux):
`curl -fsSL https://raw.githubusercontent.com/WVDYC/repOx/main/install.sh | sh`
Code is open source (MIT / Apache). Curious what you all currently use for feeding code into LLMs and if there are specific prompt templates you'd like added.
[link] [comments]
More from r/LocalLLaMA
-
The AI race: China's open-weight models trail US closed models by just 7 months
Oct 14
-
Anthropic Executive Says Open-Source AI Models Are Higher Risk
Oct 14
-
ComfyUI v0.40.0 released
Oct 14
-
So this is how they do it --> RTX 5090, once a consumer gaming card, is now on smugglers’ menu alongside cigarettes
Oct 14
Discussion (0)
Sign in to join the discussion. Free account, 30 seconds — email code or GitHub.
Sign in →No comments yet. Sign in and be the first to say something.