>_Repomix公式
@yamadashy
詳細
Repomix について
Packs a whole repository, or just the files you pick, into one AI-friendly XML, Markdown, JSON or plain-text file with token counts, secret filtering and optional Tree-sitter compression.
Repomix のインストール方法
No install
npx repomix@latestnpm (global)
npm install -g repomixHomebrew
brew install repomixDocker
docker run -v ./output:/app -it --rm ghcr.io/yamadashy/repomix --remote https://github.com/yamadashy/repomixYarn (yarn global add repomix) and Bun (bun add -g repomix) also work. Repomix is MIT licensed, has about 29k GitHub stars and is actively maintained. It also comes as a website (repomix.com), a browser extension and a VS Code extension.
ログインと認証
- 1
repomixNo account or API key is needed. Run it in a project directory and it writes repomix-output.xml there.
- 2
repomix --initCreate a repomix.config.json with defaults for include, ignore and output settings.
Repomix runs locally. --remote clones a public repository first; config files from remote repositories are not loaded unless you pass --remote-trust-config.
できること
Pack a local or remote GitHub repository into one file (repomix-output.xml by default)
Per-file and total token counts, plus a token-count tree
Respects .gitignore/.repomixignore and drops files that match credential patterns (Secretlint)
--compress, --mcp server mode and --skill-generate for Claude Agent Skills
よく使うコマンド
- 1
repomixPack the current directory into repomix-output.xml, respecting .gitignore, .ignore and .repomixignore.
- 2
repomix --style markdownChoose the output format: xml (default), markdown, json or plain.
- 3
repomix --include "src/**/*.ts,**/*.md" --ignore "**/*.log,tmp/"Limit the pack with glob patterns.
- 4
repomix --remote yamadashy/repomix --remote-branch mainPack a GitHub repository by URL or user/repo shorthand, at a branch, tag or commit.
- 5
repomix --compressUse Tree-sitter to keep key code structure and cut token count.
- 6
git ls-files "*.ts" | repomix --stdinPack exactly the files listed on stdin (works with find, rg, fd or fzf).
- 7
repomix --token-count-tree 100Show the file tree with token counts, only for files with at least 100 tokens.
- 8
repomix --mcp --sandboxRun as an MCP server for AI assistants, with file tools confined to the working directory.
- 9
repomix --skill-generateGenerate a Claude Agent Skills folder (.claude/skills/<name>/) from the codebase.
注意点
- What it is: Repomix turns a codebase into a single file that you can paste or upload to an AI model such as Claude, ChatGPT, Gemini or Grok. The output has a file summary, the directory structure and every included file, plus per-file and total token counts so you can check context limits.
- Who it is for: developers who want an AI to review, explain or refactor a whole project, or to generate docs or tests, without copying files one by one.
- How it differs: it is git-aware by default, filters files that match known credential formats with Secretlint, can compress code with Tree-sitter, can split large output with --split-output 2mb, and can run as an MCP server or produce Claude Agent Skills.
- Limits: the output is only as current as the moment you ran it, and very large repositories can exceed a model's context even with --compress; narrow with --include or --stdin. Secretlint catches known credential formats, not every secret, so review the output before sharing it.
- MCP safety: without --sandbox, the MCP server can read any path your user can, and pack_codebase loads the repomix.config.* of the directory it packs, which is code. Use --sandbox when packing repositories you don't trust.
- FAQ: Is Repomix free? Yes, it is open source under MIT. Is it the same as the Repomix entry under MCP clients? That page covers the same project; this page is the command-line guide. Can it pack a private repo? Run it locally inside the cloned repo; --remote is for repositories git can clone from your machine.
参考資料
2026-11-13 に公式ドキュメントと照合しました。
その他の開発者ツール CLI
Bun
$ bun
An all-in-one JavaScript runtime, package manager, bundler, and test runner.
GitHub CLI
$ gh
GitHub on the command line: repositories, pull requests, issues, Actions, releases, and API calls.
GitLab CLI
$ glab
GitLab’s official CLI for merge requests, issues, pipelines, releases, snippets, and self-managed instances.
HTTPie
$ http
A human-friendly HTTP client with JSON, sessions, auth, and formatted output.
Lazygit
$ lazygit
A keyboard-driven terminal UI for staging, rebasing, branching, and Git history.
Playwright
$ playwright
Cross-browser end-to-end testing and browser automation from the command line.
コメント