bmad-setup 1.8.0 → 1.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +17 -15
  2. package/bin/cli.js +46 -7
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,21 +1,21 @@
1
1
  # BMAD Framework Submodule
2
2
 
3
- ![Version](https://img.shields.io/badge/version-1.5.0-blue.svg)
3
+ ![Version](https://img.shields.io/badge/version-1.8.1-blue.svg)
4
4
  ![npm](https://img.shields.io/npm/v/bmad-setup.svg)
5
- ![BMAD](https://img.shields.io/badge/BMAD-6.0.0--beta.8-orange.svg)
5
+ ![BMAD](https://img.shields.io/badge/BMAD-6.0.4-orange.svg)
6
6
  ![License](https://img.shields.io/badge/license-MIT-green.svg)
7
7
  ![Claude Code](https://img.shields.io/badge/Claude%20Code-only-purple.svg)
8
8
 
9
9
  BMAD 프레임워크를 Git Submodule로 관리하여 **팀별, 프로젝트별로 간편하게 커스터마이징**할 수 있는 세팅 도구입니다.
10
10
 
11
- 한 줄 설치(`npx bmad-setup`)로 에이전트, 워크플로우, 지식 베이스를 프로젝트에 즉시 적용하고, 필요한 모듈만 골라 사용할 수 있습니다.
11
+ 한 줄 설치(`npx bmad-setup@latest`)로 에이전트, 워크플로우, 지식 베이스를 프로젝트에 즉시 적용하고, 필요한 모듈만 골라 사용할 수 있습니다.
12
12
 
13
13
  > **Claude Code 전용** — 슬래시 커맨드 및 에이전트 시스템이 Claude Code의 커맨드 구조에 맞춰 설계되어 있습니다.
14
14
 
15
15
  | 항목 | 버전 |
16
16
  | ----------------- | ------------ |
17
- | Submodule Version | v1.5.0 |
18
- | BMAD Framework | 6.0.0-beta.8 |
17
+ | Submodule Version | v1.8.1 |
18
+ | BMAD Framework | 6.0.4 |
19
19
 
20
20
  > [Changelog](./CHANGELOG.md)에서 변경 이력을 확인하세요.
21
21
 
@@ -53,7 +53,7 @@ BMAD 프레임워크 원본은 범용으로 설계되어 있습니다. 이 서
53
53
  | PR 크기 | 300개 이상 파일 변경 | 2개 파일만 변경 |
54
54
  | 업데이트 | 각 프로젝트마다 수동 복사 | `git pull` 한 번으로 해결 |
55
55
  | 버전 관리 | 어떤 버전인지 추적 어려움 | 커밋 SHA로 정확한 버전 추적 |
56
- | 설치 | 수동 복사 | `npx bmad-setup` 한 줄 |
56
+ | 설치 | 수동 복사 | `npx bmad-setup@latest` 한 줄 |
57
57
 
58
58
  프레임워크 원본이 업데이트되더라도, 커스터마이징한 설정은 프로젝트에 그대로 유지됩니다.
59
59
 
@@ -78,7 +78,7 @@ BMAD 프레임워크 원본은 범용으로 설계되어 있습니다. 이 서
78
78
  ### 설치
79
79
 
80
80
  ```bash
81
- npx bmad-setup
81
+ npx bmad-setup@latest
82
82
  ```
83
83
 
84
84
  자동으로 수행되는 작업:
@@ -86,18 +86,20 @@ npx bmad-setup
86
86
  1. `bmad-submodule` Git Submodule 추가 및 초기화
87
87
  2. `.gitmodules`에 `ignore = dirty` 설정
88
88
  3. `install.sh` 실행 (심볼릭 링크 생성)
89
- 4. `.gitignore`에 BMAD 항목 추가
90
- 5. `package.json`에 postinstall / bmad:install / bmad:uninstall 스크립트 추가
89
+ 4. `post-checkout` hook 설치 (worktree 자동 지원)
90
+ 5. `.gitignore`에 BMAD 항목 추가
91
+ 6. `package.json`에 postinstall / bmad:install / bmad:uninstall 스크립트 추가
91
92
 
92
93
  > 이미 설치된 항목은 자동으로 스킵됩니다 (멱등성 보장).
94
+ > Git worktree 환경에서는 자동 감지되어 submodule 초기화 + 심링크만 실행됩니다.
93
95
 
94
96
  ### 업데이트
95
97
 
96
98
  ```bash
97
- npx bmad-setup --update
99
+ npx bmad-setup@latest --update
98
100
  ```
99
101
 
100
- Submodule을 최신 버전으로 pull하고 심볼릭 링크를 갱신합니다.
102
+ Submodule을 최신 버전으로 fetch하고, 부모 repo 참조를 갱신하고, 심볼릭 링크를 재생성합니다.
101
103
 
102
104
  ### 동작 확인
103
105
 
@@ -150,7 +152,7 @@ bmad-submodule/
150
152
 
151
153
  ## 수동 설치
152
154
 
153
- `npx bmad-setup` 대신 직접 설치하려면 아래 단계를 따르세요.
155
+ `npx bmad-setup@latest` 대신 직접 설치하려면 아래 단계를 따르세요.
154
156
 
155
157
  ### 1단계: Submodule 추가
156
158
 
@@ -180,9 +182,9 @@ git config -f .gitmodules submodule.bmad-submodule.ignore dirty
180
182
  ```json
181
183
  {
182
184
  "scripts": {
183
- "postinstall": "[ -z \"$CI\" ] && git submodule update --init --recursive && git -C bmad-submodule pull origin master && ./bmad-submodule/install.sh || true",
184
- "bmad:install": "./bmad-submodule/install.sh",
185
- "bmad:uninstall": "./bmad-submodule/uninstall.sh"
185
+ "postinstall": "[ -z \"$CI\" ] && git -C bmad-submodule fetch origin master && git -C bmad-submodule checkout origin/master && git add bmad-submodule && ./bmad-submodule/install.sh \"$(pwd)\" || true",
186
+ "bmad:install": "./bmad-submodule/install.sh \"$(pwd)\"",
187
+ "bmad:uninstall": "./bmad-submodule/uninstall.sh \"$(pwd)\""
186
188
  }
187
189
  }
188
190
  ```
package/bin/cli.js CHANGED
@@ -3,6 +3,7 @@
3
3
  'use strict';
4
4
 
5
5
  const { execSync, execFileSync } = require('child_process');
6
+ const https = require('https');
6
7
  const fs = require('fs');
7
8
  const path = require('path');
8
9
 
@@ -53,10 +54,10 @@ bmad-setup v${VERSION}
53
54
  BMAD Framework 서브모듈을 한 줄로 설치합니다.
54
55
 
55
56
  Usage:
56
- npx bmad-setup 전체 설치 실행 (worktree 자동 감지)
57
- npx bmad-setup --update 서브모듈 최신화 + 심링크 재생성 + 부모 참조 갱신
58
- npx bmad-setup --help 도움말 표시
59
- npx bmad-setup --version 버전 표시
57
+ npx bmad-setup@latest 전체 설치 실행 (worktree 자동 감지)
58
+ npx bmad-setup@latest --update 서브모듈 최신화 + 심링크 재생성 + 부모 참조 갱신
59
+ npx bmad-setup@latest --help 도움말 표시
60
+ npx bmad-setup@latest --version 버전 표시
60
61
 
61
62
  Install steps:
62
63
  1. git submodule add (bmad-submodule)
@@ -83,6 +84,39 @@ Requirements:
83
84
  }
84
85
  }
85
86
 
87
+ // --- Version check against npm registry ---
88
+ function checkLatestVersion() {
89
+ return new Promise((resolve) => {
90
+ const req = https.get(
91
+ 'https://registry.npmjs.org/bmad-setup/latest',
92
+ { timeout: 3000 },
93
+ (res) => {
94
+ let data = '';
95
+ res.on('data', (chunk) => (data += chunk));
96
+ res.on('end', () => {
97
+ try {
98
+ const latest = JSON.parse(data).version;
99
+ if (latest && latest !== VERSION) {
100
+ console.log('');
101
+ log('\u26a0', `새 버전이 있습니다: v${latest} (현재: v${VERSION})`);
102
+ log('', ' 최신 버전으로 실행하세요: npx bmad-setup@latest');
103
+ console.log('');
104
+ }
105
+ } catch (e) {
106
+ // ignore parse errors
107
+ }
108
+ resolve();
109
+ });
110
+ },
111
+ );
112
+ req.on('error', () => resolve());
113
+ req.on('timeout', () => {
114
+ req.destroy();
115
+ resolve();
116
+ });
117
+ });
118
+ }
119
+
86
120
  // --- Step 0: Pre-validation ---
87
121
  function validateGitRepo() {
88
122
  try {
@@ -136,7 +170,7 @@ function isWorktree() {
136
170
  // --- Update mode ---
137
171
  function pullLatest() {
138
172
  if (!fs.existsSync(SUBMODULE_DIR)) {
139
- log(' \u274c', `${SUBMODULE_DIR}/ 디렉토리가 없습니다. 먼저 \`npx bmad-setup\`으로 설치하세요.`);
173
+ log(' \u274c', `${SUBMODULE_DIR}/ 디렉토리가 없습니다. 먼저 \`npx bmad-setup@latest\`으로 설치하세요.`);
140
174
  process.exit(1);
141
175
  }
142
176
  runSafe(`git -C ${SUBMODULE_DIR} fetch origin master`, 'Submodule fetch');
@@ -354,9 +388,11 @@ function patchPackageJson() {
354
388
  }
355
389
 
356
390
  // --- Main ---
357
- function main() {
391
+ async function main() {
358
392
  handleFlags();
359
393
 
394
+ await checkLatestVersion();
395
+
360
396
  validateGitRepo();
361
397
  validateGitVersion();
362
398
 
@@ -441,4 +477,7 @@ function runSteps(steps, doneMessage) {
441
477
  console.log('');
442
478
  }
443
479
 
444
- main();
480
+ main().catch((e) => {
481
+ log('\u274c', e.message);
482
+ process.exit(1);
483
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bmad-setup",
3
- "version": "1.8.0",
3
+ "version": "1.8.2",
4
4
  "description": "BMAD Framework submodule installer - one command setup",
5
5
  "bin": {
6
6
  "bmad-setup": "bin/cli.js"