snaprepo
Format codebases for AI tools: create context-optimized snapshots of your repository.
What it does
snaprepo creates formatted snapshots of your codebase optimized for pasting into AI assistants. It respects .gitignore and outputs a single text block with file paths and contents ready for LLM consumption.
Key features
- Smart filtering: respects
.gitignore - Token-aware: estimates token count to help you stay within context limits
- Tree view: directory tree prepended to output
Tech stack
Python CLI using fnmatch for gitignore matching and tiktoken for token estimation.