Repomix combines a repository into one XML, Markdown, JSON, or plain-text file for AI tools. It respects gitignore rules, estimates tokens, and runs via npx, global install, Docker, or the repomix.com web UI.
Overview
Repomix targets developers who need to hand an entire project—or a filtered slice—to large language models and similar assistants without manually copying files. A single command walks the tree and emits a structured bundle tuned for machine reading.
Output defaults to XML but can switch to Markdown, JSON, or plain text, with options to add directory maps, file summaries, line numbers, git logs, diffs, and compression that trims code down to structural skeletons. Token counts per file and for the whole run help stay within model context limits.
File selection honors .gitignore, .ignore, and .repomixignore, supports include and ignore globs, stdin file lists, and cloning remote GitHub repositories. Secretlint integration is advertised to skip known credential patterns from the export.
Beyond the CLI, a browser UI packs public repos, a Chrome extension adds GitHub one-click access, and community VS Code and MCP integrations wrap the same engine for in-editor and agent workflows.
Key features
- Single-file repository packing
- XML, Markdown, JSON, or plain output
- Per-file and total token counts
- Git-aware ignore and log options
- Remote repository cloning
- Credential pattern detection
- Configurable compression and filtering
- Web UI and browser extension
Use cases
- Feeding full context to chat assistants
- AI-assisted code review prompts
- Documentation generation from source
- Packing repos for MCP agents
- Sharing filtered trees in CI