Skip to content

命令行选项

基本选项

bash
repomix [directory]  # 处理指定目录(默认为当前目录 ".")

输出选项

选项说明默认值
-o, --output <file>输出文件名repomix-output.txt
--style <type>输出格式(plain, xml, markdownplain
--output-show-line-numbers添加行号false
--copy复制到剪贴板false
--no-file-summary禁用文件概要true
--no-directory-structure禁用目录结构true
--remove-comments移除注释false
--remove-empty-lines移除空行false

过滤选项

选项说明
--include <patterns>包含模式(逗号分隔)
-i, --ignore <patterns>忽略模式(逗号分隔)

远程仓库

选项说明
--remote <url>处理远程仓库
--remote-branch <name>指定分支/标签/提交

配置

选项说明
-c, --config <path>自定义配置文件路径
--init创建配置文件
--global使用全局配置

安全

选项说明默认值
--no-security-check禁用安全检查true

其他选项

选项说明
-v, --version显示版本
--verbose启用详细日志
--top-files-len <number>显示的顶部文件数量

使用示例

bash
# 基本用法
repomix

# 自定义输出
repomix -o output.xml --style xml

# 处理特定文件
repomix --include "src/**/*.ts" --ignore "**/*.test.ts"

# 远程仓库
repomix --remote user/repo --remote-branch main

Released under the MIT License.