← all repositories
yamadashy/repomix

Turn your repo into LLM kibble with one command

Repomix collapses entire codebases into a single AI-friendly file, because context windows are hungry and copy-pasting is undignified.

26.1k stars TypeScript Data ToolingOther AI
repomix
Velocity · 7d
+38
★ / day
Trend
steady
star history

What it does Repomix is a CLI tool (plus website, browser extension, and VSCode plugin) that ingests a repository and emits one consolidated file—XML, Markdown, or plain text—formatted for LLM consumption. It respects .gitignore, counts tokens per file and total, and can even fetch remote repos by URL or GitHub shorthand. Run npx repomix@latest in any directory and you get repomix-output.xml ready to paste into Claude, ChatGPT, or whatever model you’re currently appeasing.

The interesting bit The --compress flag uses Tree-sitter to strip code down to structural skeletons—signatures, imports, key elements—slashing token count while preserving enough shape for the LLM to reason about architecture. It’s the kind of boring optimization that actually matters when you’re hitting context limits. Also: Secretlint integration means it tries not to leak your API keys into the prompt, which is more than can be said for your last manual copy-paste job.

Key highlights

  • One-shot CLI via npx, plus global installs through npm/yarn/bun/Homebrew
  • Remote repo packing with branch/tag/commit granularity
  • --stdin mode pipes file lists from find, rg, fzf, or git ls-files for surgical selection
  • Browser extensions for Chrome/Firefox add a “Repomix” button to any GitHub repo page
  • Community VSCode extension (Repomix Runner) for in-editor workflow
  • Token counting built-in, because guessing context usage is a recipe for truncation sadness

Caveats

  • The README is vague on exactly how Tree-sitter compression decides what to keep vs. discard; your mileage may vary by language
  • Website and browser extension are convenient but require trusting a third-party service with repo access (or at least names)
  • VSCode extension is community-maintained, not official

Verdict Worth a look if you regularly feed codebases to LLMs and are tired of manual curation or cat **/*.ts | pbcopy. Skip it if your workflow is already handled by IDE-native AI features or you only ever work in single-file scripts.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.