Skip to content

Repomix

Pack your codebase into AI-friendly formats

Output Format

Include Patterns (using glob patterns)

Ignore Patterns

Output Options

빠른 시작

Repomix를 사용하여 패키지 파일(repomix-output.txt)을 생성한 후, 다음과 같은 프롬프트와 함께 AI 어시스턴트에게 전송할 수 있습니다:

이 파일은 저장소의 모든 파일을 하나로 통합한 것입니다.
코드를 리팩터링하고 싶으니 먼저 검토해 주세요.

AI는 전체 코드베이스를 분석하고 포괄적인 인사이트를 제공할 것입니다:

Repomix 사용 예시 1

구체적인 변경 사항을 논의할 때는 AI가 코드 생성을 도와줍니다. Claude의 Artifacts와 같은 기능을 사용하면 상호 의존적인 여러 파일도 한 번에 받을 수 있습니다:

Repomix 사용 예시 2

즐거운 코딩 되세요! 🚀

파워 유저 가이드

고급 사용자를 위해 Repomix는 CLI 인터페이스를 통해 다양한 사용자 정의 옵션을 제공합니다.

빠른 시작

프로젝트 디렉토리에서 설치 없이 바로 Repomix를 시작할 수 있습니다:

bash
npx repomix

또는 반복 사용을 위해 전역 설치:

bash
# npm으로 설치
npm install -g repomix

# 또는 yarn으로 설치
yarn global add repomix

# 또는 Homebrew로 설치 (macOS/Linux)
brew install repomix

# 그런 다음 아무 프로젝트 디렉토리에서 실행
repomix

이게 전부입니다! Repomix가 현재 디렉토리에 repomix-output.txt 파일을 생성하며, 이 파일에는 AI 친화적인 형식으로 정리된 전체 코드베이스가 포함됩니다.

사용법

전체 저장소를 패키징:

bash
repomix

특정 디렉토리를 패키징:

bash
repomix path/to/directory

glob 패턴을 사용하여 특정 파일이나 디렉토리를 지정:

bash
repomix --include "src/**/*.ts,**/*.md"

특정 파일이나 디렉토리 제외:

bash
repomix --ignore "**/*.log,tmp/"

원격 저장소 처리:

bash
repomix --remote https://github.com/yamadashy/repomix

# GitHub 단축형도 사용 가능:
repomix --remote yamadashy/repomix

# 브랜치명, 태그, 또는 커밋 해시 지정 가능:
repomix --remote https://github.com/yamadashy/repomix --remote-branch main

# 또는 특정 커밋 해시 사용:
repomix --remote https://github.com/yamadashy/repomix --remote-branch 935b695

새 설정 파일(repomix.config.json) 초기화:

bash
repomix --init

생성된 파일은 Claude, ChatGPT, Gemini와 같은 생성형 AI 도구와 함께 사용할 수 있습니다.

Docker 사용법

Docker를 사용하여 Repomix를 실행할 수도 있습니다 🐳
격리된 환경에서 Repomix를 실행하거나 컨테이너를 선호하는 경우에 유용합니다.

기본 사용법(현재 디렉토리):

bash
docker run -v .:/app -it --rm ghcr.io/yamadashy/repomix

특정 디렉토리를 처리:

bash
docker run -v .:/app -it --rm ghcr.io/yamadashy/repomix path/to/directory

원격 저장소를 처리하고 output 디렉토리에 출력:

bash
docker run -v ./output:/app -it --rm ghcr.io/yamadashy/repomix --remote https://github.com/yamadashy/repomix

출력 형식

선호하는 출력 형식을 선택하세요:

bash
# XML 형식(기본값)
repomix --style xml

# Markdown 형식
repomix --style markdown

# 일반 텍스트 형식
repomix --style plain

사용자 정의

repomix.config.json을 생성하여 지속적인 설정을 관리할 수 있습니다:

json
{
  "output": {
    "style": "markdown",
    "filePath": "custom-output.md",
    "removeComments": true,
    "showLineNumbers": true,
    "topFilesLength": 10
  },
  "ignore": {
    "customPatterns": ["*.test.ts", "docs/**"]
  }
}

더 많은 예제

TIP

💡 전체 문서와 더 많은 예제는 GitHub 저장소를 참조하세요!

Released under the MIT License.