I Built repo-pack: A Single-Binary Rust CLI & MCP Server to Pack Repos for LLMs
When working with LLMs on real codebases, feeding the right context without blowing up your token budget (or waiting seconds for heavy runtimes to boot) is half the battle. Tools like Repomix are great, but I wanted som
When working with LLMs on real codebases, feeding the right context without blowing up your token budget (or waiting seconds for heavy runtimes to boot) is half the battle.
Tools like Repomix are great, but I wanted something that shipped as a single native binary with zero Node/Python runtime dependencies, ran in a few milliseconds offline, and could strip function implementations at the AST level when I only needed architectural context.
So I built repo-pack in Rust.
What makes it different?
1. Single binary, zero runtime overhead
repo-pack compiles down to a single static binary (~8 MB with Tree-sitter grammars included, or under 3 MB with --no-default-features). It walks your project respecting .gitignore and .ignore (even outside git repos), skips binaries and lockfiles automatically, and outputs structured XML or Markdown in milliseconds.
2. AST Skeleton Mode (--skeleton & --focus)
Dumping an entire repository raw wastes massive amounts of context on function internals you don't care about.
With --skeleton, repo-pack parses Rust, TypeScript/TSX, JavaScript/JSX, and Python using Tree-sitter, replacing function and method bodies with { ... } (or ... in Python while preserving docstrings). Imports, types, structs, classes, and signatures stay intact.
bash
# Skeletonize the entire repository for high-level architectural context
repo-pack . --skeleton
# Keep full code only for auth files, skeletonize everything else
repo-pack . --focus "src/auth/*"
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.