### Local Development Setup Source: https://github.com/yamadashy/repomix/blob/main/CONTRIBUTING.md Steps to clone the repository, install dependencies, and set up Repomix for local development. ```bash git clone https://github.com/yamadashy/repomix.git cd repomix npm install ``` -------------------------------- ### Setup Source: https://github.com/yamadashy/repomix/blob/main/scripts/memory/README.md Navigate to the memory scripts directory and install dependencies. ```bash cd scripts/memory npm install ``` -------------------------------- ### Local Codebase Analysis Example Source: https://github.com/yamadashy/repomix/blob/main/llms-install.md Example prompt for analyzing a local project using Repomix. ```bash Can you analyze the code in my project at /path/to/project? Please use Repomix to package it first. ``` -------------------------------- ### Quick Start: Install Repomix Globally Source: https://github.com/yamadashy/repomix/blob/main/README.md Instructions on how to install the Repomix CLI tool globally using npm, yarn, bun, or Homebrew. ```bash npm install -g repomix yarn global add repomix bun add -g repomix brew install repomix ``` -------------------------------- ### Developer Guide Generation Prompt Source: https://github.com/yamadashy/repomix/blob/main/website/client/src/en/guide/prompt-examples.md Prompt template for creating a developer guide covering setup, project structure, workflow, testing, and troubleshooting. ```text Create a developer guide covering: 1. Setup instructions 2. Project structure overview 3. Development workflow 4. Testing approach 5. Common troubleshooting steps ``` -------------------------------- ### Verify Installation Command Source: https://github.com/yamadashy/repomix/blob/main/llms-install.md Example commands to test Repomix installation by packaging local directories or remote repositories. ```bash Please package the local directory /path/to/project for AI analysis using Repomix. ``` ```bash Please fetch and package the GitHub repository yamadashy/repomix for AI analysis. ``` -------------------------------- ### Implementation Planning Prompt Source: https://github.com/yamadashy/repomix/blob/main/website/client/src/en/guide/use-cases.md An example prompt for using Repomix to get implementation advice considering the entire codebase architecture. ```text I want to add user authentication to this application. Please review the current codebase structure and suggest the best approach that fits with the existing architecture. ``` -------------------------------- ### Creating User Guides with AI Source: https://github.com/yamadashy/repomix/blob/main/website/client/src/hi/guide/tips/best-practices.md Example of using AI to create user guides. ```text Please create a user guide for this CLI tool, including installation, configuration, and common usage examples. ``` -------------------------------- ### read_repomix_output Example Source: https://github.com/yamadashy/repomix/blob/main/llms-install.md Example configuration for the read_repomix_output tool, specifying the output ID and optional start and end lines for partial reading. ```json { "outputId": "8f7d3b1e2a9c6054", "startLine": 100, "endLine": 200 } ``` -------------------------------- ### pack_codebase tool example Source: https://github.com/yamadashy/repomix/blob/main/llms-install.md Example JSON payload for the pack_codebase tool. ```json { "directory": "/path/to/your/project", "compress": false, "includePatterns": "src/**/*.ts,**/*.md", "ignorePatterns": "**/*.log,tmp/", "topFilesLength": 10 } ``` -------------------------------- ### Specific File Types Analysis Example Source: https://github.com/yamadashy/repomix/blob/main/llms-install.md Example prompt for packaging a project with specific file types using Repomix. ```bash Please package my project at /path/to/project, but only include TypeScript files and markdown documentation. ``` -------------------------------- ### Remote Repository Analysis Example Source: https://github.com/yamadashy/repomix/blob/main/llms-install.md Example prompt for analyzing a remote GitHub repository using Repomix. ```bash I'd like you to review the code in the GitHub repository username/repo. Please use Repomix to package it first. ``` -------------------------------- ### file_system_read_file Example Source: https://github.com/yamadashy/repomix/blob/main/llms-install.md Example configuration for the file_system_read_file tool, specifying the absolute path to the file. ```json { "path": "/absolute/path/to/file.txt" } ``` -------------------------------- ### Local Development Setup Source: https://github.com/yamadashy/repomix/blob/main/website/client/src/en/guide/development/index.md Steps to clone the repository, install dependencies, and run the CLI locally. ```bash git clone https://github.com/yamadashy/repomix.git cd repomix npm install npm run repomix ``` -------------------------------- ### grep_repomix_output Example Source: https://github.com/yamadashy/repomix/blob/main/llms-install.md Example configuration for the grep_repomix_output tool, specifying the output ID, search pattern, context lines, and case sensitivity. ```json { "outputId": "8f7d3b1e2a9c6054", "pattern": "function\s+\w+\( ", "contextLines": 3, "ignoreCase": false } ``` -------------------------------- ### Global Installation with Bun Source: https://github.com/yamadashy/repomix/blob/main/website/client/src/en/guide/installation.md Install Repomix globally using Bun. ```bash bun add -g repomix ``` -------------------------------- ### Basic Usage Examples Source: https://github.com/yamadashy/repomix/blob/main/README.md Various command-line examples demonstrating different functionalities of Repomix. ```bash # Basic usage repomix # Custom output repomix -o output.xml --style xml # Output to stdout repomix --stdout > custom-output.txt # Send output to stdout, then pipe into another command (for example, simonw/llm) repomix --stdout | llm "Please explain what this code does." # Custom output with compression repomix --compress # Process specific files repomix --include "src/**/*.ts" --ignore "**/*.test.ts" # Split output into multiple files (max size per part) repomix --split-output 20mb # Remote repository with branch repomix --remote https://github.com/user/repo/tree/main # Remote repository with commit repomix --remote https://github.com/user/repo/commit/836abcd7335137228ad77feb28655d85712680f1 # Remote repository with shorthand repomix --remote user/repo ``` -------------------------------- ### Example .repomixignore Source: https://github.com/yamadashy/repomix/blob/main/website/client/src/de/guide/configuration.md An example of how to define repository-specific ignore patterns in a .repomixignore file. ```text # Cache directories .cache/ tmp/ # Build outputs dist/ build/ # Logs *.log ``` -------------------------------- ### Include Examples and References Source: https://github.com/yamadashy/repomix/blob/main/website/client/src/hi/guide/custom-instructions.md Include examples or references that can help the AI model. ```markdown # Examples and References ## API Endpoint Example ```json GET /api/users { "users": [ { "id": 1, "name": "John Doe" }, { "id": 2, "name": "Jane Smith" } ] } ``` ## Database Schema Reference User schema has the following fields: - id: UUID - name: String - email: String - createdAt: Date ``` -------------------------------- ### Include Patterns Example Source: https://github.com/yamadashy/repomix/blob/main/website/client/src/en/guide/configuration.md Example of specifying include patterns in the configuration file. ```json { "include": ["src/**/*", "tests/**/*.test.js"] } ``` -------------------------------- ### Running Repomix Locally Source: https://github.com/yamadashy/repomix/blob/main/CONTRIBUTING.md Command to run the Repomix application after local setup. ```bash npm run repomix ``` -------------------------------- ### Using npx Source: https://github.com/yamadashy/repomix/blob/main/website/client/src/en/guide/installation.md Install and run Repomix using npx without global installation. ```bash npx repomix@latest ``` -------------------------------- ### Global Installation with Homebrew Source: https://github.com/yamadashy/repomix/blob/main/website/client/src/en/guide/installation.md Install Repomix globally using Homebrew. ```bash brew install repomix ``` -------------------------------- ### Example: references/project-structure.md Source: https://github.com/yamadashy/repomix/blob/main/website/client/src/en/guide/agent-skills-generation.md Example of the project structure file content. ```text src/ index.ts (42 lines) utils/ helpers.ts (128 lines) math.ts (87 lines) ``` -------------------------------- ### Create a Personal Reference Library Source: https://github.com/yamadashy/repomix/blob/main/website/client/src/fr/guide/agent-skills-generation.md Workflow example for cloning and analyzing an open-source project to create a personal reference library using Repomix and Claude. ```bash # Cloner et analyser un projet open source intéressant repomix --remote facebook/react --skill-generate react-reference # Les Skills sont sauvegardés dans ~/.claude/skills/react-reference/ # Maintenant vous pouvez référencer la base de code de React dans n'importe quelle conversation Claude ``` -------------------------------- ### Refactoring Assistance Prompt Source: https://github.com/yamadashy/repomix/blob/main/website/client/src/en/guide/use-cases.md An example prompt for using Repomix to get refactoring suggestions that maintain consistency across the entire codebase. ```text This codebase needs refactoring to improve maintainability. Please suggest improvements while keeping the existing functionality intact. ``` -------------------------------- ### Website Development Server Source: https://github.com/yamadashy/repomix/blob/main/CONTRIBUTING.md Command to start the VitePress website development server locally. ```bash npm run website ``` -------------------------------- ### Global Installation with Yarn Source: https://github.com/yamadashy/repomix/blob/main/website/client/src/en/guide/installation.md Install Repomix globally using Yarn. ```bash yarn global add repomix ``` -------------------------------- ### Global Installation with pnpm Source: https://github.com/yamadashy/repomix/blob/main/website/client/src/en/guide/installation.md Install Repomix globally using pnpm. ```bash pnpm add -g repomix ``` -------------------------------- ### File System Tool Examples Source: https://github.com/yamadashy/repomix/blob/main/website/client/src/ja/guide/mcp-server.md TypeScript examples demonstrating the usage of file_system_read_file and file_system_read_directory tools. ```typescript // ファイルの読み取り const fileContent = await tools.file_system_read_file({ path: '/absolute/path/to/file.txt' }); // ディレクトリの内容一覧 const dirContent = await tools.file_system_read_directory({ path: '/absolute/path/to/directory' }); ``` -------------------------------- ### Global Installation with npm Source: https://github.com/yamadashy/repomix/blob/main/website/client/src/en/guide/installation.md Install Repomix globally using npm. ```bash npm install -g repomix ``` -------------------------------- ### Example Configuration File Source: https://github.com/yamadashy/repomix/blob/main/website/client/src/en/guide/configuration.md A comprehensive example of a Repomix configuration file (`repomix.config.json`) covering various options. ```json { "$schema": "https://repomix.com/schemas/latest/schema.json", "input": { "maxFileSize": 50000000 }, "output": { "filePath": "repomix-output.xml", "style": "xml", "parsableStyle": false, "compress": false, "headerText": "Custom header information for the packed file.", "fileSummary": true, "directoryStructure": true, "files": true, "removeComments": false, "removeEmptyLines": false, "topFilesLength": 5, "showLineNumbers": false, "truncateBase64": false, "copyToClipboard": false, "includeEmptyDirectories": false, "git": { "sortByChanges": true, "sortByChangesMaxCommits": 100, "includeDiffs": false, "includeLogs": false, "includeLogsCount": 50 } }, "include": ["**/*"], "ignore": { "useGitignore": true, "useDefaultPatterns": true, // Patterns can also be specified in .repomixignore "customPatterns": [ "additional-folder", "**/*.log" ] }, "security": { "enableSecurityCheck": true }, "tokenCount": { "encoding": "o200k_base" } } ``` -------------------------------- ### Manual Installation Steps Source: https://github.com/yamadashy/repomix/blob/main/browser/README.md Steps to manually install the extension in Chrome after building. ```bash npm run build chrome # Then follow the UI steps in Chrome ``` -------------------------------- ### TypeScript Configuration Example Source: https://github.com/yamadashy/repomix/blob/main/website/client/src/en/guide/configuration.md Example of a TypeScript configuration file for Repomix. ```typescript // repomix.config.ts import { defineConfig } from 'repomix'; export default defineConfig({ output: { filePath: 'output.xml', style: 'xml', removeComments: true, }, ignore: { customPatterns: ['**/node_modules/**', '**/dist/**'], }, }); ``` -------------------------------- ### Start Development Server Source: https://github.com/yamadashy/repomix/blob/main/website/README.md Starts the website development server and provides the local access URL. ```bash # Start the website development server npm run website # Access the website at http://localhost:5173/ ``` -------------------------------- ### XML Output Example Source: https://github.com/yamadashy/repomix/blob/main/website/client/src/hi/guide/custom-instructions.md Example of how custom instructions are included in XML output. ```xml // File content ``` -------------------------------- ### Example .repomixignore file Source: https://github.com/yamadashy/repomix/blob/main/website/client/src/it/guide/configuration.md An example of how to define exclusion patterns in a .repomixignore file. ```text # Cache directories .cache/ tmp/ # Build output dist/ build/ # Logs *.log ``` -------------------------------- ### Example: references/files.md Source: https://github.com/yamadashy/repomix/blob/main/website/client/src/en/guide/agent-skills-generation.md Example of the files.md content, showing a code snippet. ```markdown ## File: src/index.ts ```typescript import { sum } from './utils/helpers'; export function main() { console.log(sum(1, 2)); } ``` ``` -------------------------------- ### Example: references/tech-stacks.md Source: https://github.com/yamadashy/repomix/blob/main/website/client/src/hi/guide/agent-skills-generation.md Example of auto-detected tech stack from dependency files. ```text Auto-detected tech stack from dependency files: - **Languages**: TypeScript, JavaScript, Python, etc. - **Frameworks**: React, Next.js, Express, Django, etc. - **Runtime Versions**: Node.js, Python, Go, etc. - **Package Managers**: npm, pnpm, poetry, etc. - **Dependencies**: All direct and dev dependencies - **Config Files**: All detected configuration files Detected from these files: `package.json`, `requirements.txt`, `Cargo.toml`, `go.mod`, `.nvmrc`, `pyproject.toml`, etc. ``` -------------------------------- ### attach_packed_output tool example Source: https://github.com/yamadashy/repomix/blob/main/llms-install.md Example JSON payload for the attach_packed_output tool. ```json { "path": "/path/to/directory/with/repomix-output.xml", "topFilesLength": 10 } ``` -------------------------------- ### Git Integration Configuration Example Source: https://github.com/yamadashy/repomix/blob/main/website/client/src/en/guide/configuration.md An example JSON configuration for enabling various Git-aware features in Repomix. ```json { "output": { "git": { "sortByChanges": true, "sortByChangesMaxCommits": 100, "includeDiffs": true, "includeLogs": true, "includeLogsCount": 25 } } } ``` -------------------------------- ### Example Workflow: Creating a Personal Reference Library Source: https://github.com/yamadashy/repomix/blob/main/website/client/src/en/guide/agent-skills-generation.md A workflow example for cloning and analyzing an open-source project to create a personal reference library of skills. ```bash # Clone and analyze an interesting open source project repomix --remote facebook/react --skill-generate react-reference # The Skills are saved to ~/.claude/skills/react-reference/ # Now you can reference React's codebase in any Claude conversation ``` -------------------------------- ### Basic Usage with runCli Source: https://github.com/yamadashy/repomix/blob/main/website/client/src/en/guide/development/using-repomix-as-a-library.md Demonstrates how to use the `runCli` function to pack the current directory with custom options. ```javascript import { runCli, type CliOptions } from 'repomix'; // Process current directory with custom options async function packProject() { const options = { output: 'output.xml', style: 'xml', compress: true, quiet: true } as CliOptions; const result = await runCli(['.'], process.cwd(), options); return result.packResult; } ``` -------------------------------- ### Example Custom Instruction Markdown File Source: https://github.com/yamadashy/repomix/blob/main/website/client/src/en/guide/custom-instructions.md An example of the content that can be placed in a custom instruction markdown file. ```markdown # Repository Instructions This repository contains the source code for the Repomix tool. Please follow these guidelines when analyzing the code: 1. Focus on the core functionality in the `src/core` directory. 2. Pay special attention to the security checks in `src/core/security`. 3. Ignore any files in the `tests` directory. ``` -------------------------------- ### Pack a library repository or documentation for AI reference Source: https://github.com/yamadashy/repomix/blob/main/website/client/src/en/guide/faq.md These commands show how to pack a remote repository or specific files within it to provide context to an AI assistant. ```bash npx repomix --remote owner/repo npx repomix --remote owner/repo --include "docs/**,src/**" ``` -------------------------------- ### Git Integration Configuration Example Source: https://github.com/yamadashy/repomix/blob/main/website/client/src/ja/guide/configuration.md A JSON configuration example for enabling and customizing Git integration features. ```json { "output": { "git": { "sortByChanges": true, "sortByChangesMaxCommits": 100, "includeDiffs": true, "includeLogs": true, "includeLogsCount": 30 } } } ``` -------------------------------- ### Dependency Injection Example Source: https://github.com/yamadashy/repomix/blob/main/CLAUDE.md Example demonstrating dependency injection through a 'deps' object parameter for improved testability. ```typescript export const functionName = async ( param1: Type1, param2: Type2, deps = { defaultFunction1, defaultFunction2, } ) => { // Use deps.defaultFunction1() instead of direct call }; ``` -------------------------------- ### Remote Repository Processing Examples Source: https://github.com/yamadashy/repomix/blob/main/README.md Examples demonstrating how to process remote Git repositories using Repomix. ```bash repomix --remote https://github.com/yamadashy/repomix ``` ```bash repomix --remote yamadashy/repomix ``` ```bash # Using --remote-branch option repomix --remote https://github.com/yamadashy/repomix --remote-branch main # Using branch's URL repomix --remote https://github.com/yamadashy/repomix/tree/main ``` ```bash # Using --remote-branch option repomix --remote https://github.com/yamadashy/repomix --remote-branch 935b695 # Using commit's URL repomix --remote https://github.com/yamadashy/repomix/commit/836abcd7335137228ad77feb28655d85712680f1 ``` -------------------------------- ### pack_remote_repository Example Source: https://github.com/yamadashy/repomix/blob/main/llms-install.md Example configuration for the pack_remote_repository tool, specifying remote repository, compression, include/ignore patterns, and top files length. ```json { "remote": "yamadashy/repomix", "compress": false, "includePatterns": "src/**/*.ts,**/*.md", "ignorePatterns": "**/*.log,tmp/", "topFilesLength": 10 } ``` -------------------------------- ### Example Configuration Source: https://github.com/yamadashy/repomix/blob/main/README.md A comprehensive example configuration for Repomix, demonstrating various options for input, output, include/ignore patterns, security, and token counting. ```json5 { "$schema": "https://repomix.com/schemas/latest/schema.json", "input": { "maxFileSize": 50000000 }, "output": { "filePath": "repomix-output.xml", "style": "xml", "parsableStyle": false, "compress": false, "headerText": "Custom header information for the packed file.", "fileSummary": true, "directoryStructure": true, "files": true, "removeComments": false, "removeEmptyLines": false, "topFilesLength": 5, "tokenCountTree": false, // or true, or a number like 10 for minimum token threshold "showLineNumbers": false, "truncateBase64": false, "copyToClipboard": false, "splitOutput": null, // or a number like 1000000 for ~1MB per file "includeEmptyDirectories": false, "git": { "sortByChanges": true, "sortByChangesMaxCommits": 100, "includeDiffs": false, "includeLogs": false, "includeLogsCount": 50 } }, "include": ["**/*"], "ignore": { "useGitignore": true, "useDefaultPatterns": true, // Patterns can also be specified in .repomixignore "customPatterns": [ "additional-folder", "**/*.log" ], }, "security": { "enableSecurityCheck": true }, "tokenCount": { "encoding": "o200k_base" } } ``` -------------------------------- ### file_system_read_directory tool parameters Source: https://github.com/yamadashy/repomix/blob/main/llms-install.md Example JSON payload for the file_system_read_directory tool, specifying the absolute path to a directory. ```json { "path": "/absolute/path/to/directory" } ``` -------------------------------- ### Initializing a repomix.config.json file Source: https://github.com/yamadashy/repomix/blob/main/website/client/src/en/guide/faq.md Command to create a configuration file for repeatable team workflows. ```bash repomix --init ``` -------------------------------- ### Run the project Source: https://github.com/yamadashy/repomix/blob/main/tests/integration-tests/fixtures/packager/inputs/simple-project/README.md Command to run the simple project. ```bash npm start ``` -------------------------------- ### Directory Structure Output Example Source: https://github.com/yamadashy/repomix/blob/main/website/client/src/de/guide/configuration.md Illustrates how binary file paths are listed in the directory structure output while their content is excluded. ```text src/ index.ts utils.ts assets/ logo.png build/ app.jar ``` -------------------------------- ### Prompt Example: Documentation Generation Source: https://github.com/yamadashy/repomix/blob/main/README.md Example prompt for AI tools to generate project documentation based on the provided codebase. ```text Based on the codebase in this file, please generate a detailed README.md that includes an overview of the project, its main features, setup instructions, and usage examples. ``` -------------------------------- ### Repomix MCP Server Configuration Source: https://github.com/yamadashy/repomix/blob/main/llms-install.md Configuration to add to your MCP settings file for various LLM clients. ```json { "mcpServers": { "repomix": { "command": "npx", "args": [ "-y", "repomix", "--mcp" ], "disabled": false, "autoApprove": [] } } } ``` -------------------------------- ### Team Project Documentation Source: https://github.com/yamadashy/repomix/blob/main/website/client/src/fr/guide/agent-skills-generation.md Workflow example for generating skills for a team project, saving them locally, and committing them to the repository for team access. ```bash # Dans votre répertoire de projet cd my-project # Générer des Skills pour votre équipe repomix --skill-generate # Choisissez "Project Skills" quand demandé # Les Skills sont sauvegardés dans .claude/skills/repomix-reference-my-project/ # Commitez et partagez avec votre équipe git add .claude/skills/ git commit -m "Add codebase reference Skills" ``` -------------------------------- ### Repomix CLI Command Examples Source: https://github.com/yamadashy/repomix/blob/main/skills/repomix-explorer/SKILL.md Examples of how to use the Repomix CLI for packing remote and local repositories, including common options. ```bash npx repomix@latest --remote --output /tmp/-analysis.xml ``` ```bash npx repomix@latest [directory] [options] ``` ```bash # Basic remote pack (always use /tmp) npx repomix@latest --remote yamadashy/repomix --output /tmp/repomix-analysis.xml ``` ```bash # Basic local pack npx repomix@latest ``` ```bash # Pack specific directory npx repomix@latest ./src ``` ```bash # Large repo with compression (use /tmp) npx repomix@latest --remote facebook/react --compress --output /tmp/react-analysis.xml ``` ```bash # Include only specific file types npx repomix@latest --include "**/*.{ts,tsx,js,jsx}" ``` -------------------------------- ### JavaScript Example with Comment Removal Source: https://github.com/yamadashy/repomix/blob/main/website/client/src/en/guide/comment-removal.md Demonstrates the effect of comment removal on JavaScript code, showing the input with comments and the resulting output without them. ```javascript // This is a single-line comment function test() { /* This is a multi-line comment */ return true; } ``` ```javascript function test() { return true; } ``` -------------------------------- ### Auto-generated Skill Names Source: https://github.com/yamadashy/repomix/blob/main/website/client/src/fr/guide/agent-skills-generation.md Examples of how Repomix generates skill names automatically based on the source path or a custom name, normalized to kebab-case. ```bash repomix src/ --skill-generate # → repomix-reference-src repomix --remote user/repo --skill-generate # → repomix-reference-repo repomix --skill-generate CustomName # → custom-name (normalisé en kebab-case) ``` -------------------------------- ### Documentation Generation Prompt Source: https://github.com/yamadashy/repomix/blob/main/website/client/src/en/guide/use-cases.md An example prompt for using Repomix to generate comprehensive documentation for an entire codebase. ```text Generate comprehensive documentation for this codebase, including API documentation, setup instructions, and developer guides. ``` -------------------------------- ### Including specific source or documentation paths with --include Source: https://github.com/yamadashy/repomix/blob/main/website/client/src/en/guide/faq.md Shows how to use the `--include` flag to specify only the desired source or documentation paths. ```bash repomix --include "src/**/*.ts,docs/**/*.md" ``` -------------------------------- ### Skills Documentation Only Source: https://github.com/yamadashy/repomix/blob/main/website/client/src/fr/guide/agent-skills-generation.md Examples of using the `--include` option to generate skills containing only the documentation of a GitHub repository, useful for referencing specific library or framework documentation. ```bash # Documentation Claude Code Action repomix --remote https://github.com/anthropics/claude-code-action --include docs --skill-generate # Documentation Vite repomix --remote https://github.com/vitejs/vite --include docs --skill-generate # Documentation React repomix --remote https://github.com/reactjs/react.dev --include src/content --skill-generate ``` -------------------------------- ### Development Setup and Commands Source: https://github.com/yamadashy/repomix/blob/main/browser/README.md Commands for setting up the development environment, generating icons, running in development mode for different browsers, and building the extension. ```bash npm install npm run generate-icons npm run dev chrome npm run dev firefox npm run dev edge ``` -------------------------------- ### Repomix commands plugin example usage Source: https://github.com/yamadashy/repomix/blob/main/README.md Examples demonstrating how to use the repomix-commands plugin for packing local and remote codebases. ```text /repomix-commands:pack-local Pack this project as markdown with compression /repomix-commands:pack-remote yamadashy/repomix Pack only TypeScript files from the yamadashy/repomix repository ``` -------------------------------- ### Repomix explorer plugin example usage Source: https://github.com/yamadashy/repomix/blob/main/README.md Examples demonstrating how to use the repomix-explorer plugin for analyzing local and remote codebases with AI assistance. ```text /repomix-explorer:explore-local ./src Find all authentication-related code /repomix-explorer:explore-remote facebook/react Show me the main component architecture ``` -------------------------------- ### Install using Homebrew Source: https://github.com/yamadashy/repomix/blob/main/website/client/src/en/index.md Install Repomix using Homebrew on macOS/Linux. ```bash # Alternatively using Homebrew (macOS/Linux) brew install repomix ``` -------------------------------- ### Verification Commands Source: https://github.com/yamadashy/repomix/blob/main/website/client/src/en/guide/installation.md Verify the Repomix installation by checking the version and help output. ```bash repomix --version repomix --help ``` -------------------------------- ### grep_repomix_output Example Source: https://github.com/yamadashy/repomix/blob/main/website/client/src/en/guide/mcp-server.md Example JSON configuration for the grep_repomix_output tool. ```json { "outputId": "8f7d3b1e2a9c6054", "pattern": "function\\s+\\w+\\( ", "contextLines": 3, "ignoreCase": false } ``` -------------------------------- ### Quick Start Source: https://github.com/yamadashy/repomix/blob/main/scripts/memory/README.md Run quick memory leak checks or detailed analysis. ```bash # Quick memory leak check npm run leak:quick # Detailed analysis npm run leak:analyze ``` -------------------------------- ### Commit Message Examples Source: https://github.com/yamadashy/repomix/blob/main/AGENTS.md Examples of commit messages following Conventional Commits. ```text feat(cli): Add new --no-progress flag fix(security): Handle special characters in file paths docs(website): Update installation guide refactor(core): Split packager into smaller modules test(cli): Add tests for new CLI options ``` -------------------------------- ### Install Repomix Source: https://github.com/yamadashy/repomix/blob/main/README.md Install Repomix as a dev dependency for TypeScript or JavaScript configuration. ```bash npm install -D repomix ``` -------------------------------- ### Example Workflow: Team Project Documentation Source: https://github.com/yamadashy/repomix/blob/main/website/client/src/en/guide/agent-skills-generation.md A workflow example for generating and sharing skills within a team for project documentation. ```bash # In your project directory cd my-project # Generate Skills for your team repomix --skill-generate # Choose "Project Skills" when prompted # The Skills are saved to .claude/skills/repomix-reference-my-project/ # Commit and share with your team git add .claude/skills/ git commit -m "Add codebase reference Skills" ``` -------------------------------- ### Markdown Output Example Source: https://github.com/yamadashy/repomix/blob/main/website/client/src/hi/guide/custom-instructions.md Example of how custom instructions are included in Markdown output. ```markdown # Project Instructions This is a Node.js backend API... --- # Repository ## src/index.ts ```typescript // File content ``` ``` -------------------------------- ### API Documentation Generation Prompt Source: https://github.com/yamadashy/repomix/blob/main/website/client/src/en/guide/prompt-examples.md Prompt template for generating comprehensive API documentation, including endpoints, formats, examples, and limitations. ```text Generate comprehensive API documentation: 1. List and describe all public endpoints 2. Document request/response formats 3. Include usage examples 4. Note any limitations or constraints ``` -------------------------------- ### Run Repomix Source: https://github.com/yamadashy/repomix/blob/main/website/client/src/en/index.md After installation, run Repomix in any project directory. ```bash # Then run in any project directory repomix ``` -------------------------------- ### Dynamic Values Example Source: https://github.com/yamadashy/repomix/blob/main/website/client/src/en/guide/configuration.md Example of using dynamic values in a TypeScript configuration file. ```typescript // repomix.config.ts import { defineConfig } from 'repomix'; // Generate timestamp-based filename const timestamp = new Date().toISOString().slice(0, 19).replace(/[:.]/g, '-'); export default defineConfig({ output: { filePath: `output-${timestamp}.xml`, style: 'xml', }, }); ``` -------------------------------- ### Codebase Onboarding Source: https://github.com/yamadashy/repomix/blob/main/website/client/src/en/guide/use-cases.md Help new team members quickly understand your codebase structure and key concepts. ```text You are helping a new developer understand this codebase. Please provide an overview of the architecture, explain the main components and their interactions, and highlight the most important files to review first. ``` -------------------------------- ### Dependency Injection Example Source: https://github.com/yamadashy/repomix/blob/main/AGENTS.md Example of injecting dependencies through a 'deps' object parameter for testability. ```typescript export const functionName = async ( param1: Type1, param2: Type2, deps = { defaultFunction1, defaultFunction2, } ) => { // Use deps.defaultFunction1() instead of direct call }; ``` -------------------------------- ### Controlling token count and output splitting Source: https://github.com/yamadashy/repomix/blob/main/website/client/src/en/guide/faq.md Examples of using `--token-count-tree` to inspect token usage and `--split-output` to manage large outputs. ```bash repomix --token-count-tree 1000 repomix --split-output 1mb ``` -------------------------------- ### Install globally using bun Source: https://github.com/yamadashy/repomix/blob/main/website/client/src/en/index.md Install Repomix globally using bun for repeated use. ```bash # Alternatively using bun bun add -g repomix ``` -------------------------------- ### Narrowing packed context with include and ignore patterns Source: https://github.com/yamadashy/repomix/blob/main/website/client/src/en/guide/faq.md Examples of using `--include` and `--ignore` flags to control which files are processed by Repomix. ```bash repomix --include "src/**/*.ts,docs/**/*.md" repomix --ignore "**/*.test.ts,dist/**" repomix --compress repomix --remove-comments ``` -------------------------------- ### Install globally using yarn Source: https://github.com/yamadashy/repomix/blob/main/website/client/src/en/index.md Install Repomix globally using yarn for repeated use. ```bash # Alternatively using yarn yarn global add repomix ``` -------------------------------- ### Install globally using npm Source: https://github.com/yamadashy/repomix/blob/main/website/client/src/en/index.md Install Repomix globally using npm for repeated use. ```bash # Install using npm npm install -g repomix ``` -------------------------------- ### Docker Installation - Remote Repository Source: https://github.com/yamadashy/repomix/blob/main/website/client/src/en/guide/installation.md Run Repomix using Docker to process a remote repository. ```bash # Remote repository docker run -v ./output:/app -it --rm ghcr.io/yamadashy/repomix --remote yamadashy/repomix ```