promptgarten ๐ŸŒฑ

Add-ons & integrations ยท Context

Repomix

โ˜… 27.334

Packs your entire repository into a single, AI-friendly file โ€” ideal for handing an LLM or chat model the whole codebase at once.

Repomix walks your repository and writes it into a single, AI-readable file (XML, Markdown or plain text). It respects .gitignore, counts tokens per file and in total, and can optionally compress the code via Tree-sitter to save space. A built-in secret check (Secretlint) warns about credentials accidentally packed in. Besides local folders it can process remote repos, runs without installation via npx, is available as a web tool at repomix.com and can be attached to agents as an MCP server.

๐Ÿ”ง SETUP

  1. No installation: run `npx repomix@latest` in the project folder
  2. Install globally: `npm install -g repomix` (or `yarn global add repomix`)
  3. Result: a single file (e.g. `repomix-output.xml`) โ€” paste it whole into ChatGPT/Claude/Gemini
  4. Online with no setup: repomix.com; optionally as an MCP server for agents

โœ… WHEN TO USE IT?

Handing a whole codebase to a chat model

One `npx repomix` produces a file you paste in full into Claude/ChatGPT โ€” instead of copying file by file.

Keeping an eye on the token budget

Repomix counts tokens per file and overall and respects .gitignore so only what matters gets in.

โ›” WHEN NOT TO?

An agent with its own file search

A coding agent (Claude Code, Cursor) reads files on demand โ€” a packed all-in-one file is then often needlessly large.

Better: Let the agent work directly in the repo; for targeted context use Serena or Graphify.

A very large monorepo

The whole repo can blow past the context window โ€” even with compression.

Better: Use include/ignore filters to pack only the relevant folders.

SOURCES