npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

auto-cherry-pick

v0.4.0

Published

Automated cherry-pick tool for multiple branches

Downloads

14

Readme

Auto Cherry-Pick

여러 브랜치에 자동으로 cherry-pick을 수행하는 간단한 도구입니다.

기능

  • 여러 브랜치에 동시에 cherry-pick 적용
  • 자동으로 원격 저장소에 push
  • 병렬 처리로 성능 최적화
  • JSON 결과 출력
  • 컨플릭트 감지 모드: 컨플릭트 발생 브랜치만 보고
  • 자동 해결 모드: Codex CLI로 컨플릭트 자동 해결

설치 및 사용법

npx로 직접 실행 (권장)

npx auto-cherry-pick "TARGET_BRANCHES" "COMMITS"

전역 설치

npm install -g auto-cherry-pick
auto-cherry-pick "TARGET_BRANCHES" "COMMITS"

로컬 설치

npm install auto-cherry-pick
npx auto-cherry-pick "TARGET_BRANCHES" "COMMITS"

매개변수

  • TARGET_BRANCHES: 쉼표로 구분된 대상 브랜치 목록
    • 예: "release/1.2,hotfix/urgent,feat/new-api"
  • COMMITS: 쉼표로 구분된 커밋 SHA 목록
    • 예: "20e780eaed45aecb14e65bc5b5af3831f0b63604,3fa12c..."

옵션

  • --dry-run: 실제 실행 없이 계획만 표시
  • --conflict-detect: 컨플릭트가 발생한 브랜치만 감지하고 보고
  • --auto-resolve: Codex CLI로 컨플릭트를 자동으로 해결

예시

# 개별 커밋들을 여러 브랜치에 적용
npx auto-cherry-pick "release/1.2,hotfix/urgent" "abc123,def456"

# 단일 커밋을 단일 브랜치에 적용
npx auto-cherry-pick "release/1.2" "abc123"

# dry-run으로 미리 확인
npx auto-cherry-pick "release/1.2" "abc123" --dry-run

# 컨플릭트 감지 모드
npx auto-cherry-pick "release/1.2,hotfix/urgent" "abc123" --conflict-detect

# 자동 해결 모드 (Codex CLI 필요)
npx auto-cherry-pick "release/1.2,hotfix/urgent" "abc123" --auto-resolve

컨플릭트 해결 기능

컨플릭트 감지 모드 (--conflict-detect)

컨플릭트가 발생한 브랜치만 감지하고 상세 정보를 보고합니다:

npx auto-cherry-pick "branch1,branch2" "commit123" --conflict-detect

출력 예시:

=== 컨플릭트 감지 ===
컨플릭트 파일 수: 1
컨플릭트 파일 목록:
  - conflict-test.js

컨플릭트 상세 정보:
  파일: conflict-test.js, 라인: 1
    내용: <<<<<<< HEAD

자동 해결 모드 (--auto-resolve)

Codex CLI를 사용하여 컨플릭트를 자동으로 해결합니다:

npx auto-cherry-pick "branch1,branch2" "commit123" --auto-resolve

동작 과정:

  1. 컨플릭트 발생 시 Codex CLI 실행
  2. 컨플릭트 마커 제거 및 변경사항 병합
  3. git add로 해결된 파일 스테이징
  4. git cherry-pick --continue로 커밋 완료
  5. 원격 저장소에 자동 푸시

요구사항:

  • Codex CLI가 설치되어 있어야 함
  • Codex CLI가 없으면 자동으로 건너뛰고 실패 처리

실제 테스트 결과

컨플릭트 자동 해결 테스트 결과

위 이미지는 실제 컨플릭트 자동 해결 테스트 결과를 보여줍니다:

  • Codex CLI가 컨플릭트를 성공적으로 해결
  • git addgit cherry-pick --continue 자동 실행
  • 원격 저장소에 성공적으로 푸시
  • 최종 상태: success

출력 형식

스크립트는 JSON 형식으로 결과를 stdout에 출력합니다:

{
  "commits": ["sha1", "sha2"],
  "branches": [
    {
      "name": "release/1.2",
      "status": "success",
      "steps": {
        "fetch": true,
        "cherryPick": "ok",
        "push": "ok"
      },
      "notes": ""
    },
    {
      "name": "hotfix/urgent",
      "status": "conflict",
      "steps": {
        "fetch": true,
        "cherryPick": "conflict",
        "push": "ok"
      },
      "notes": "컨플릭트 감지됨"
    }
  ]
}

상태 값:

  • success: 성공적으로 완료
  • failed: 실패
  • conflict: 컨플릭트 발생 (감지 모드에서만)

종료 코드

  • 0: 모든 브랜치에서 성공
  • 1: 실패

로그

상세한 로그는 .multi-pick/logs/{branch}/에 저장됩니다.

안전 기능

  • 현재 저장소 경로 밖의 파일 수정 금지
  • 파괴적 명령어 사용 금지
  • 네트워크는 git push만 허용

요구사항

  • Node.js 14.0.0+
  • Git
  • Codex CLI (자동 해결 모드 사용 시)

개발

# 의존성 설치
npm install

# 빌드
npm run build

# 테스트
npm test

# 린트
npm run lint

배포

# npm에 배포
npm publish