Skip to content

Commit 85c436b

Browse files
feat(init): auto-install MDD globally during init and update
Run 'npm install -g @thedecipherist/mdd && mdd install' as part of both the init and update flows so MDD is wired up automatically. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 4c13dad commit 85c436b

2 files changed

Lines changed: 17 additions & 1 deletion

File tree

bin/cli.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import fs from 'fs';
33
import path from 'path';
44
import os from 'os';
55
import https from 'https';
6+
import { execSync } from 'child_process';
67
import { fileURLToPath } from 'url';
78

89
const __filename = fileURLToPath(import.meta.url);
@@ -160,6 +161,17 @@ export function mergeSettings(homeDir = os.homedir()) {
160161
fs.writeFileSync(glPath, JSON.stringify(gl, null, 2), 'utf8');
161162
}
162163

164+
// ── MDD integration ───────────────────────────────────────────────────────────
165+
166+
function runMddInstall() {
167+
try {
168+
execSync('npm install -g @thedecipherist/mdd', { stdio: 'inherit' });
169+
execSync('mdd install', { stdio: 'inherit' });
170+
} catch {
171+
console.log(' ⚠ MDD install skipped — run manually: npm install -g @thedecipherist/mdd && mdd install');
172+
}
173+
}
174+
163175
// ── main commands ─────────────────────────────────────────────────────────────
164176

165177
export async function init(homeDir = os.homedir()) {
@@ -176,6 +188,8 @@ export async function init(homeDir = os.homedir()) {
176188
console.log(` Copied claude-mastery-project.conf → ${claudeDir}`);
177189
}
178190
fs.writeFileSync(path.join(claudeDir, 'starter-kit-source-path'), starterKitDir, 'utf8');
191+
console.log('\nInstalling MDD workflow...');
192+
runMddInstall();
179193
const version = readInstalledVersion(homeDir);
180194
console.log(`\n✅ Installed v${version} to ${starterKitDir}`);
181195
console.log(' Run /starter-kit update inside Claude Code to update in future.\n');
@@ -191,6 +205,8 @@ export async function update(homeDir = os.homedir()) {
191205
copyPackageFiles(homeDir);
192206
symlinkAll(homeDir);
193207
mergeSettings(homeDir);
208+
console.log('\nUpdating MDD workflow...');
209+
runMddInstall();
194210
console.log(`\n✅ Updated to v${readInstalledVersion(homeDir)}`);
195211
}
196212

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@claude-code-mastery/starter-kit",
3-
"version": "1.3.0",
3+
"version": "1.3.1",
44
"description": "Production-ready Claude Code starter kit — commands, hooks, skills, and agents for AI-assisted development",
55
"type": "module",
66
"publishConfig": {

0 commit comments

Comments
 (0)