Repomix

v1.19.0
io.github.yamadashy/repomix Checked 2 hours ago Published 23 days ago

Pack local or remote codebases into AI-friendly files that LLMs and coding agents can read or search

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

pack_codebase Pack Local Codebase

Package a local code directory into a consolidated file for AI analysis. This tool analyzes the codebase structure, extracts relevant code content, and generates a comprehensive report including metrics, file tree, and formatted code content. Supports multiple output formats: XML (structured with <file> tags), Markdown (human-readable with ## headers and code blocks), JSON (machine-readable with files as key-value pairs), and Plain text (simple format with separators). Also supports Tree-sitter compression for efficient token usage.

ParameterTypeDescription
directory *stringDirectory to pack (Absolute path). Any directory readable by this process can be packed.
compressbooleanEnable Tree-sitter compression to extract essential code signatures and structure while removing implementation details. Reduces token usage by ~70% while preserving semantic meaning. Generally not ne…
ignorePatternsstringSpecify additional files to exclude using fast-glob patterns. Multiple patterns can be comma-separated (e.g., "test/**,*.spec.js", "node_modules/**,dist/**"). These patterns supplement .gitignore and…
includePatternsstringSpecify files to include using fast-glob patterns. Multiple patterns can be comma-separated (e.g., "**/*.{js,ts}", "src/**,docs/**"). Only matching files will be processed. Useful for focusing on spec…
outputPatternsarrayPer-file inclusion levels. Patterns are evaluated in order and the first match wins; directoryStructureOnly takes precedence over compress, and a match with neither flag forces FULL content (use this…
stylestringOutput format style: xml (structured tags, default), markdown (human-readable with code blocks), json (machine-readable key-value), or plain (simple text with separators)
topFilesLengthintegerNumber of largest files by size to display in the metrics summary for codebase analysis (default: 10)

read_repomix_output Read Repomix Output

Read the contents of a Repomix-generated output file. Supports partial reading with line range specification for large files. This tool is designed for environments where direct file system access is limited (e.g., web-based environments, sandboxed applications). For direct file system access, use standard file operations.

ParameterTypeDescription
outputId *stringID of the Repomix output file to read
endLinenumberEnding line number (1-based, inclusive). If not specified, reads to end.
startLinenumberStarting line number (1-based, inclusive). If not specified, reads from beginning.

grep_repomix_output Grep Repomix Output

Search for patterns in a Repomix output file using grep-like functionality with JavaScript RegExp syntax. Returns matching lines with optional context lines around matches.

ParameterTypeDescription
outputId *stringID of the Repomix output file to search
pattern *stringSearch pattern (JavaScript RegExp regular expression syntax)
afterLinesnumberNumber of context lines to show after each match (like grep -A). Takes precedence over contextLines.
beforeLinesnumberNumber of context lines to show before each match (like grep -B). Takes precedence over contextLines.
contextLinesnumberNumber of context lines to show before and after each match (default: 0). Overridden by beforeLines/afterLines if specified.
ignoreCasebooleanPerform case-insensitive matching (default: false)

pack_remote_repository Pack Remote Repository

Fetch, clone, and package a GitHub repository into a consolidated file for AI analysis. This tool automatically clones the remote repository, analyzes its structure, and generates a comprehensive report. Supports multiple output formats: XML (structured with <file> tags), Markdown (human-readable with ## headers and code blocks), JSON (machine-readable with files as key-value pairs), and Plain text (simple format with separators). Also supports various GitHub URL formats. Files matching known secret formats are excluded, but that scan is a heuristic, not an access boundary.

ParameterTypeDescription
remote *stringGitHub repository URL or user/repo format (e.g., "yamadashy/repomix", "https://github.com/user/repo", or "https://github.com/user/repo/tree/branch")
compressbooleanEnable Tree-sitter compression to extract essential code signatures and structure while removing implementation details. Reduces token usage by ~70% while preserving semantic meaning. Generally not ne…
ignorePatternsstringSpecify additional files to exclude using fast-glob patterns. Multiple patterns can be comma-separated (e.g., "test/**,*.spec.js", "node_modules/**,dist/**"). These patterns supplement .gitignore and…
includePatternsstringSpecify files to include using fast-glob patterns. Multiple patterns can be comma-separated (e.g., "**/*.{js,ts}", "src/**,docs/**"). Only matching files will be processed. Useful for focusing on spec…
outputPatternsarrayPer-file inclusion levels. Patterns are evaluated in order and the first match wins; directoryStructureOnly takes precedence over compress, and a match with neither flag forces FULL content (use this…
stylestringOutput format style: xml (structured tags, default), markdown (human-readable with code blocks), json (machine-readable key-value), or plain (simple text with separators)
topFilesLengthintegerNumber of largest files by size to display in the metrics summary for codebase analysis (default: 10)

generate_skill Generate Claude Agent Skill

Generate a Claude Agent Skill from a local code directory. Creates a skill package containing SKILL.md (entry point with metadata) and references/ folder with summary.md, project-structure.md, files.md, and optionally tech-stacks.md. This tool creates Project Skills in <project>/.claude/skills/<name>/, which are shared with the team via version control. Output Structure: .claude/skills/<skill-name>/ ├── SKILL.md # Entry point with usage guide └── references/ ├── summary.md # Purpose, format, and statistics ├── project-…

ParameterTypeDescription
directory *stringDirectory to pack (Absolute path)
compressbooleanEnable Tree-sitter compression to extract essential code signatures and structure while removing implementation details (default: false).
ignorePatternsstringSpecify additional files to exclude using fast-glob patterns. Multiple patterns can be comma-separated (e.g., "test/**,*.spec.js").
includePatternsstringSpecify files to include using fast-glob patterns. Multiple patterns can be comma-separated (e.g., "**/*.{js,ts}", "src/**,docs/**").
skillNamestringName of the skill to generate (kebab-case, max 64 chars). Will be normalized if not in kebab-case. Used for the skill directory name and SKILL.md metadata. If omitted, auto-generates as "repomix-refer…

attach_packed_output Attach Packed Output

Attach an existing Repomix packed output file for AI analysis. This tool accepts either a directory containing a repomix output file or a direct path to a packed repository file. Supports multiple formats: XML (structured with <file> tags), Markdown (human-readable with ## headers and code blocks), JSON (machine-readable with files as key-value pairs), and Plain text (simple format with separators). Calling the tool again with the same file path will refresh the content if the file has been updated. It will return in that case a new output ID and the updated content.

ParameterTypeDescription
path *stringPath to a directory containing repomix output file or direct path to a packed repository file (supports .xml, .md, .txt, .json formats)
topFilesLengthintegerNumber of largest files by size to display in the metrics summary (default: 10)