.agents/rules/base.md
A tool that packs repository contents into a single AI-friendly file. Supports XML, Markdown, JSON, and plain text output formats.
Refer to README.md for full project overview and CONTRIBUTING.md for contribution procedures.
repomix/
├── browser/ # Browser extension source code.
├── src/ # Main source code
│ ├── cli/ # Command-line interface logic (argument parsing, command handling, output)
│ ├── config/ # Configuration loading, schema, and defaults
│ ├── core/ # Core logic of Repomix
│ │ ├── file/ # File handling (reading, processing, searching, tree structure generation, git commands)
│ │ ├── metrics/ # Calculating code metrics (character count, token count)
│ │ ├── output/ # Output generation (different styles, headers, etc.)
│ │ ├── packager/ # Orchestrates file collection, processing, output, and clipboard operations.
│ │ ├── security/ # Security checks to exclude sensitive files
│ │ ├── mcp/ # MCP server integration (packaging codebases for AI analysis)
│ │ ├── tokenCount/ # Token counting using Tiktoken
│ │ └── treeSitter/ # Code parsing using Tree-sitter and language-specific queries
│ └── shared/ # Shared utilities and types (error handling, logging, helper functions)
├── tests/ # Unit and integration tests (organized mirroring src/)
│ ├── cli/
│ ├── config/
│ ├── core/
│ ├── integration-tests/
│ ├── shared/
│ └── testing/
└── website/ # Documentation website (VitePress).
biome.json)npm run lint # Ensure code style compliance
npm run test # Verify all tests pass
Follow Conventional Commits with scope: type(scope): Description
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
contextual-commit skill (.claude/skills/contextual-commit/SKILL.md).github/pull_request_template.md#issue-numberInject dependencies through a deps object parameter for testability:
export const functionName = async (
param1: Type1,
param2: Type2,
deps = {
defaultFunction1,
defaultFunction2,
}
) => {
// Use deps.defaultFunction1() instead of direct call
};
vi.mock() only when dependency injection is not feasible