command-line-options.mdโข5.03 kB
# ๋ช
๋ นํ ์ต์
## ๊ธฐ๋ณธ ์ต์
- `-v, --version`: ๋๊ตฌ ๋ฒ์ ํ์
## CLI ์
์ถ๋ ฅ ์ต์
- `--verbose`: ์์ธํ ๋ก๊น
ํ์ฑํ
- `--quiet`: ํ์ค ์ถ๋ ฅ์ผ๋ก์ ๋ชจ๋ ์ถ๋ ฅ ๋นํ์ฑํ
- `--stdout`: ํ์ผ์ ์ฐ๋ ๋์ ํ์ค ์ถ๋ ฅ์ผ๋ก ์ถ๋ ฅ (`--output` ์ต์
๊ณผ ํจ๊ป ์ฌ์ฉํ ์ ์์)
- `--stdin`: ํ์ผ์ ์๋์ผ๋ก ๋ฐ๊ฒฌํ๋ ๋์ ํ์ค ์
๋ ฅ์์ ํ์ผ ๊ฒฝ๋ก ์ฝ๊ธฐ
- `--copy`: ์์ฑ๋ ์ถ๋ ฅ์ ์์คํ
ํด๋ฆฝ๋ณด๋์ ์ถ๊ฐ๋ก ๋ณต์ฌ
- `--token-count-tree [threshold]`: ํ ํฐ ์ ์์ฝ๊ณผ ํจ๊ป ํ์ผ ํธ๋ฆฌ ํ์ (์ ํ์ฌํญ: ์ต์ ํ ํฐ ์ ์๊ณ๊ฐ). ํฐ ํ์ผ์ ์๋ณํ๊ณ AI ์ปจํ
์คํธ ์ ํ์ ๋ํ ํ ํฐ ์ฌ์ฉ๋์ ์ต์ ํํ๋ ๋ฐ ์ ์ฉ
- `--top-files-len <number>`: ์์ฝ์ ํ์ํ ์์ ํ์ผ ์ (๊ธฐ๋ณธ๊ฐ: 5, ์: --top-files-len 20)
## Repomix ์ถ๋ ฅ ์ต์
- `-o, --output <file>`: ์ถ๋ ฅ ํ์ผ ๊ฒฝ๋ก (๊ธฐ๋ณธ๊ฐ: repomix-output.xml, ํ์ค์ถ๋ ฅ์ "-" ์ฌ์ฉ)
- `--style <type>`: ์ถ๋ ฅ ํ์: xml, markdown, json, ๋๋ plain (๊ธฐ๋ณธ๊ฐ: xml)
- `--parsable-style`: ์ ํ๋ ์คํ์ผ ์คํค๋ง๋ฅผ ๊ธฐ๋ฐ์ผ๋ก ํ์ฑ ๊ฐ๋ฅํ ์ถ๋ ฅ ํ์ฑํ. ์ด๋ ํ ํฐ ์๋ฅผ ์ฆ๊ฐ์ํฌ ์ ์์ต๋๋ค.
- `--compress`: ํ ํฐ ์๋ฅผ ์ค์ด๊ธฐ ์ํด ํ์ ํจ์ ๋ฐ ํด๋์ค ์๊ทธ๋์ฒ์ ์ด์ ์ ๋ง์ถ ์ง๋ฅํ ์ฝ๋ ์ถ์ถ ์ํ
- `--output-show-line-numbers`: ์ถ๋ ฅ์ ํ ๋ฒํธ ํ์
- `--no-file-summary`: ํ์ผ ์์ฝ ์น์
์ถ๋ ฅ ๋นํ์ฑํ
- `--no-directory-structure`: ๋๋ ํ ๋ฆฌ ๊ตฌ์กฐ ์น์
์ถ๋ ฅ ๋นํ์ฑํ
- `--no-files`: ํ์ผ ๋ด์ฉ ์ถ๋ ฅ ๋นํ์ฑํ (๋ฉํ๋ฐ์ดํฐ ์ ์ฉ ๋ชจ๋)
- `--remove-comments`: ์ง์๋๋ ํ์ผ ํ์
์์ ์ฃผ์ ์ ๊ฑฐ
- `--remove-empty-lines`: ์ถ๋ ฅ์์ ๋น ์ค ์ ๊ฑฐ
- `--truncate-base64`: Base64 ๋ฐ์ดํฐ ๋ฌธ์์ด ์๋ฅด๊ธฐ ํ์ฑํ
- `--header-text <text>`: ํ์ผ ํค๋์ ํฌํจํ ์ฌ์ฉ์ ์ ์ ํ
์คํธ
- `--instruction-file-path <path>`: ์์ธํ ์ฌ์ฉ์ ์ ์ ์ง์นจ์ด ํฌํจ๋ ํ์ผ ๊ฒฝ๋ก
- `--include-empty-directories`: ์ถ๋ ฅ์ ๋น ๋๋ ํ ๋ฆฌ ํฌํจ
- `--include-full-directory-structure`: --include ํจํด ์ฌ์ฉ ์์๋ ๋๋ ํ ๋ฆฌ ๊ตฌ์กฐ ์น์
์ ์ ์ฒด ์ ์ฅ์ ํธ๋ฆฌ ํ์
- `--include-diffs`: ์ถ๋ ฅ์ git ์ฐจ์ด์ ํฌํจ (์์
ํธ๋ฆฌ์ ์คํ
์ด์ง๋ ๋ณ๊ฒฝ์ฌํญ์ ๋ณ๋๋ก ํฌํจ)
- `--include-logs`: ์ถ๋ ฅ์ git ๋ก๊ทธ ํฌํจ (๋ ์ง, ๋ฉ์์ง, ํ์ผ ๊ฒฝ๋ก๋ฅผ ํฌํจํ ์ปค๋ฐ ํ์คํ ๋ฆฌ)
- `--include-logs-count <count>`: ํฌํจํ git ๋ก๊ทธ ์ปค๋ฐ ์ (๊ธฐ๋ณธ๊ฐ: 50)
- `--no-git-sort-by-changes`: Git ๋ณ๊ฒฝ ํ์๋ณ ํ์ผ ์ ๋ ฌ ๋นํ์ฑํ (๊ธฐ๋ณธ์ ์ผ๋ก ํ์ฑํ๋จ)
## ํ์ผ ์ ํ ์ต์
- `--include <patterns>`: ํฌํจ ํจํด ๋ชฉ๋ก (์ผํ๋ก ๊ตฌ๋ถ)
- `-i, --ignore <patterns>`: ์ถ๊ฐ ๋ฌด์ ํจํด (์ผํ๋ก ๊ตฌ๋ถ)
- `--no-gitignore`: .gitignore ํ์ผ ์ฌ์ฉ ๋นํ์ฑํ
- `--no-default-patterns`: ๊ธฐ๋ณธ ํจํด ๋นํ์ฑํ
## ์๊ฒฉ ์ ์ฅ์ ์ต์
- `--remote <url>`: ์๊ฒฉ ์ ์ฅ์ ์ฒ๋ฆฌ
- `--remote-branch <name>`: ์๊ฒฉ ๋ธ๋์น ์ด๋ฆ, ํ๊ทธ ๋๋ ์ปค๋ฐ ํด์ ์ง์ (๊ธฐ๋ณธ๊ฐ์ ์ ์ฅ์ ๊ธฐ๋ณธ ๋ธ๋์น)
## ๊ตฌ์ฑ ์ต์
- `-c, --config <path>`: ์ฌ์ฉ์ ์ ์ ๊ตฌ์ฑ ํ์ผ ๊ฒฝ๋ก
- `--init`: ๊ตฌ์ฑ ํ์ผ ์์ฑ
- `--global`: ๊ธ๋ก๋ฒ ๊ตฌ์ฑ ์ฌ์ฉ
## ๋ณด์ ์ต์
- `--no-security-check`: API ํค์ ์ํธ ๊ฐ์ ๋ฏผ๊ฐํ ๋ฐ์ดํฐ ์ค์บ ๊ฑด๋๋ฐ๊ธฐ
## ํ ํฐ ์ ์ต์
- `--token-count-encoding <encoding>`: ์นด์ดํ
์ฉ ํ ํฌ๋์ด์ ๋ชจ๋ธ: o200k_base (GPT-4o), cl100k_base (GPT-3.5/4) ๋ฑ (๊ธฐ๋ณธ๊ฐ: o200k_base)
## MCP ์ต์
- `--mcp`: AI ๋๊ตฌ ํตํฉ์ ์ํ Model Context Protocol ์๋ฒ๋ก ์คํ
## ์์
```bash
# ๊ธฐ๋ณธ ์ฌ์ฉ๋ฒ
repomix
# ์ฌ์ฉ์ ์ ์ ์ถ๋ ฅ ํ์ผ๊ณผ ํ์
repomix -o my-output.xml --style xml
# ํ์ค ์ถ๋ ฅ์ผ๋ก ์ถ๋ ฅ
repomix --stdout > custom-output.txt
# ํ์ค ์ถ๋ ฅ์ผ๋ก ์ถ๋ ฅํ ํ ๋ค๋ฅธ ๋ช
๋ น์ผ๋ก ํ์ดํ (์: simonw/llm)
repomix --stdout | llm "์ด ์ฝ๋๊ฐ ๋ฌด์์ ํ๋์ง ์ค๋ช
ํด์ฃผ์ธ์."
# ์์ถ์ ์ฌ์ฉํ ์ฌ์ฉ์ ์ ์ ์ถ๋ ฅ
repomix --compress
# Git ํตํฉ ๊ธฐ๋ฅ
repomix --include-logs # git ๋ก๊ทธ ํฌํจ (๊ธฐ๋ณธ 50๊ฐ ์ปค๋ฐ)
repomix --include-logs --include-logs-count 10 # ์ต๊ทผ 10๊ฐ ์ปค๋ฐ ํฌํจ
repomix --include-diffs --include-logs # ์ฐจ์ด์ ๊ณผ ๋ก๊ทธ ๋ชจ๋ ํฌํจ
# ํจํด์ผ๋ก ํน์ ํ์ผ ์ฒ๋ฆฌ
repomix --include "src/**/*.ts,*.md" --ignore "*.test.js,docs/**"
# ๋ธ๋์น๊ฐ ์๋ ์๊ฒฉ ์ ์ฅ์
repomix --remote https://github.com/user/repo/tree/main
# ์ปค๋ฐ์ด ์๋ ์๊ฒฉ ์ ์ฅ์
repomix --remote https://github.com/user/repo/commit/836abcd7335137228ad77feb28655d85712680f1
# ์ถ์ฝํ์ ์ฌ์ฉํ ์๊ฒฉ ์ ์ฅ์
repomix --remote user/repo
# stdin์ ์ฌ์ฉํ ํ์ผ ๋ชฉ๋ก
find src -name "*.ts" -type f | repomix --stdin
git ls-files "*.js" | repomix --stdin
echo -e "src/index.ts\nsrc/utils.ts" | repomix --stdin
# ํ ํฐ ์ ๋ถ์
repomix --token-count-tree
repomix --token-count-tree 1000 # 1000๊ฐ ์ด์์ ํ ํฐ์ ๊ฐ์ง ํ์ผ/๋๋ ํ ๋ฆฌ๋ง ํ์
```