# Repository Briefing: yamadashy/repomix
> Source: https://repoforai.com/repo/yamadashy/repomix (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/yamadashy/repomix
- **Official Docs / Website**: https://repomix.com
- **Category**: Coding, Skills & MCP (AI 编程 / Skills / MCP)
- **Primary Language**: TypeScript
- **License**: MIT
- **Engineering Health**: A+ (94/100 · Maintenance 35/35 · Adoption 19/25 · Releases 20/20 · License 20/20)
- **Latest Release**: v1.19.0 (2026-11-08) — https://github.com/yamadashy/repomix/releases
- **Review Snapshot**: 2026-12-04
- **Deployment / Stack Signals**: Docker, MCP, CLI
- **Momentum**: 29,603 ★ total (+13 24h / +148 7d) · 1,667 forks
- **Topics**: `ai`, `anthropic`, `artificial-intelligence`, `chatbot`, `chatgpt`, `claude`, `deepseek`, `developer-tools`, `gemini`, `genai`, `generative-ai`, `gpt`
- **When to Use**: Best for: Teams that need a scoped, reviewable repository snapshot for onboarding, architecture review, documentation, or cross-file refactoring, delivered through a CLI or MCP. Skip if: You need a live semantic index, already have effective on-demand file access, or cannot share source code with the intended assistant.

## Overview
```text
### Architecture & Core Mechanics
Repomix is a TypeScript repository packer with a CLI entry point at `bin/repomix.cjs` and an MCP server built on `@modelcontextprotocol/server`. Its core job is to turn a selected working tree or remote Git revision into one structured text artifact. File discovery respects `.gitignore`, `.ignore`, and `.repomixignore`, and Secretlint screens for known credential formats before matching files are excluded from the bundle.

The stack includes `globby` and `minimatch` for path matching, `gpt-tokenizer` for token counts, and `web-tree-sitter` with `@repomix/tree-sitter-wasms` for optional structural compression. The output separates the directory layout from path-labeled file contents and can append instructions from `output.instructionFilePath`. MCP is an integration surface for clients; packing itself does not call a model or build a retrieval index.

### Key Capabilities & Differentiators
Pack a local directory or use `--remote` with a Git URL or GitHub shorthand. A remote snapshot can be scoped to a branch, tag, or commit. Use `--include` and `--ignore` for glob-based selection or pipe a path list through `--stdin`; piped paths are resolved and deduplicated but do not bypass ignore rules. Git logs and diffs can be included, and `--include-logs` defaults to 50 commits.

The CLI defaults to XML and also supports Markdown and JSON. JSON maps file paths to contents, making it suitable for downstream processing without parsing a prompt-oriented document. Per-file and total token counts help identify what to trim before model handoff. `--compress` extracts key code elements with Tree-sitter; use it for structural context, and keep the relevant files uncompressed when implementation details matter.

### Trade-offs & Limitations
A single artifact is easy to inspect and share for a bounded review, but it is a snapshot, not a live index. Regenerate it when the source changes. For a large monorepo, start with a package or a specific path list: a broad bundle can spend the context budget on unrelated code, and compression can omit implementation details needed for a diagnosis. Token totals are planning estimates; check the target model's tokenizer and allowance for the rest of the prompt.

Gitingest is worth evaluating for Python-centric or data-science workflows. Repomix is a stronger fit when MCP and configurable Git-aware packing are required. If an assistant already reads files on demand, a snapshot may add more context than the task needs. Secretlint is a filter for known credential formats, not a data-loss-prevention boundary: review the artifact for sensitive source or data and enable Git history or diffs only when needed.

### Hardware & Deployment Guide
The npm package requires Node.js 22 or newer. Run `npx repomix@latest` in a project directory for a quick trial, or install it globally with `npm install -g repomix`. Local packing needs no model endpoint; fetching a remote repository requires network access. The `ghcr.io/yamadashy/repomix` image uses `node:22-slim`, includes Git and CA certificates, runs `repomix` as its entry point, and uses `/app` as its working directory for mounted input and output.

For MCP, check client compatibility before upgrading to v1.19.0: it moves to SDK v2 and the 2026-07-28 protocol and adds live progress and cancellation. Version 1.18.0 introduced single-workspace sandboxing, and v1.18.1 fixed CLI Git handling so repository-level Git configuration is no longer executed. For shared use, select a patched, pinned version, limit the workspace or container mounts to what the job needs, and review output before sending it outside that boundary.
```

## Key Capabilities
```text
- MCP lifecycle: v1.19.0 moves to SDK v2 and the 2026-07-28 protocol, with live progress and cancellation.
- File selection: `--include`, `--ignore`, and `--stdin` scope the snapshot; piped paths still respect ignore rules.
- Token budgeting: per-file and repository totals expose expensive inputs before a bundle is sent to a model.
- Structural compression: `--compress` uses Tree-sitter to retain key code elements rather than simply truncating text.
- Machine-readable output: `--style json` maps paths to file contents; XML is the default for model handoff.
- Security controls: Secretlint excludes files matching known credential formats, while MCP sandbox mode can confine access to one workspace.
```

## Quick Start / Clone
```bash
npx repomix@latest
```
