@chris1807/claude-kit 2.0.0 → 2.1.1
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.
- package/bin/cli.js +69 -8
- package/package.json +1 -1
- package/templates/infrastructure/mcp.json +7 -0
package/bin/cli.js
CHANGED
|
@@ -20,6 +20,7 @@ const showHelp = args.includes('--help') || args.includes('-h');
|
|
|
20
20
|
const globalOnly = args.includes('--global-only');
|
|
21
21
|
const installAll = args.includes('--all');
|
|
22
22
|
const dbFlag = args.find(a => a.startsWith('--db='))?.split('=')[1] || null;
|
|
23
|
+
const adoOrgFlag = args.find(a => a.startsWith('--ado-org='))?.split('=')[1] || null;
|
|
23
24
|
const targetArg = args.find(a => !a.startsWith('--') && a !== 'init');
|
|
24
25
|
|
|
25
26
|
if (showHelp) {
|
|
@@ -37,12 +38,31 @@ Options:
|
|
|
37
38
|
--all --db=mssql Install all with SQL Server
|
|
38
39
|
--all --db=azuresql Install all with Azure SQL
|
|
39
40
|
--all --db=postgres Install all with PostgreSQL
|
|
41
|
+
--ado-org=<name> Include Azure DevOps MCP for the named organization
|
|
40
42
|
--global-only Only install global agents to ~/.claude/agents/
|
|
41
43
|
--help, -h Show this help
|
|
44
|
+
|
|
45
|
+
Non-interactive (CI / piped / non-TTY contexts):
|
|
46
|
+
Use --global-only OR --all --db=<...> to skip every prompt.
|
|
47
|
+
Without these flags, the installer needs a TTY and will exit early
|
|
48
|
+
rather than hang waiting on stdin.
|
|
42
49
|
`);
|
|
43
50
|
process.exit(0);
|
|
44
51
|
}
|
|
45
52
|
|
|
53
|
+
// ============================================================================
|
|
54
|
+
// Non-interactive guard — fail fast instead of hanging on prompts
|
|
55
|
+
// ============================================================================
|
|
56
|
+
const isTTY = Boolean(process.stdin.isTTY);
|
|
57
|
+
const fullyAutomated = globalOnly || (installAll && dbFlag);
|
|
58
|
+
if (!isTTY && !fullyAutomated) {
|
|
59
|
+
console.error(chalk.red('\n ✗ Non-interactive context detected (stdin is not a TTY).'));
|
|
60
|
+
console.error(chalk.yellow(' This installer needs to prompt, but cannot. Use one of:\n'));
|
|
61
|
+
console.error(chalk.gray(' npx @chris1807/claude-kit init --global-only'));
|
|
62
|
+
console.error(chalk.gray(' npx @chris1807/claude-kit init --all --db=<mongo|mssql|azuresql|postgres|none> [--ado-org=<name>]\n'));
|
|
63
|
+
process.exit(1);
|
|
64
|
+
}
|
|
65
|
+
|
|
46
66
|
// ============================================================================
|
|
47
67
|
// Banner
|
|
48
68
|
// ============================================================================
|
|
@@ -159,7 +179,7 @@ async function main() {
|
|
|
159
179
|
{ name: 'Project Agents (deployer, db-admin, devops-tracker)', value: 'agents', checked: true },
|
|
160
180
|
{ name: 'Hooks (secret blocker, auto-format, test suggestions)', value: 'hooks', checked: true },
|
|
161
181
|
{ name: 'Slash Commands (11 commands — implement, review, deploy, releases, cherry-pick, promote, rollback, status, cleanup)', value: 'commands', checked: true },
|
|
162
|
-
{ name: 'MCP Servers (Playwright, DB, Teams, Stripe, Azure)', value: 'mcp', checked: true },
|
|
182
|
+
{ name: 'MCP Servers (Playwright, DB, Teams, Stripe, Azure, Azure DevOps)', value: 'mcp', checked: true },
|
|
163
183
|
{ name: 'Settings (hook registration)', value: 'settings', checked: true },
|
|
164
184
|
{ name: 'CLAUDE.md Workflow Section', value: 'workflow', checked: true },
|
|
165
185
|
{ name: '.gitignore Updates', value: 'gitignore', checked: true },
|
|
@@ -222,6 +242,7 @@ async function main() {
|
|
|
222
242
|
|
|
223
243
|
// ── MCP Servers (interactive selection) ───────────────────────────────
|
|
224
244
|
let dbType = 'none';
|
|
245
|
+
let selectedServers = [];
|
|
225
246
|
if (components.includes('mcp')) {
|
|
226
247
|
console.log(chalk.yellow.bold('\n🔌 MCP Servers → .mcp.json\n'));
|
|
227
248
|
|
|
@@ -244,7 +265,9 @@ async function main() {
|
|
|
244
265
|
}]);
|
|
245
266
|
db = dbAnswer;
|
|
246
267
|
}
|
|
247
|
-
|
|
268
|
+
const allServers = ['playwright', 'teams', 'azure'];
|
|
269
|
+
if (adoOrgFlag) allServers.push('azuredevops');
|
|
270
|
+
mcpChoices = { servers: allServers, db, stripe: false, adoOrg: adoOrgFlag };
|
|
248
271
|
} else {
|
|
249
272
|
// Database selection
|
|
250
273
|
const { db } = await inquirer.prompt([{
|
|
@@ -271,10 +294,22 @@ async function main() {
|
|
|
271
294
|
{ name: 'Microsoft Teams (notifications, messages)', value: 'teams', checked: true },
|
|
272
295
|
{ name: 'Stripe (payment management)', value: 'stripe', checked: false },
|
|
273
296
|
{ name: 'Azure CLI (App Service, Key Vault, DNS)', value: 'azure', checked: true },
|
|
297
|
+
{ name: 'Azure DevOps (work items, repos, pipelines, wiki)', value: 'azuredevops', checked: false },
|
|
274
298
|
],
|
|
275
299
|
}]);
|
|
276
300
|
|
|
277
|
-
|
|
301
|
+
let adoOrg = null;
|
|
302
|
+
if (servers.includes('azuredevops')) {
|
|
303
|
+
const { org } = await inquirer.prompt([{
|
|
304
|
+
type: 'input',
|
|
305
|
+
name: 'org',
|
|
306
|
+
message: 'Azure DevOps organization name (e.g. contoso for dev.azure.com/contoso):',
|
|
307
|
+
validate: (v) => v.trim().length > 0 || 'Organization name is required',
|
|
308
|
+
}]);
|
|
309
|
+
adoOrg = org.trim();
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
mcpChoices = { servers, db, stripe: servers.includes('stripe'), adoOrg };
|
|
278
313
|
}
|
|
279
314
|
|
|
280
315
|
// Build MCP config
|
|
@@ -334,7 +369,16 @@ async function main() {
|
|
|
334
369
|
};
|
|
335
370
|
}
|
|
336
371
|
|
|
372
|
+
if (mcpChoices.servers.includes('azuredevops') && mcpChoices.adoOrg) {
|
|
373
|
+
mcpConfig.mcpServers['azure-devops'] = {
|
|
374
|
+
command: 'npx',
|
|
375
|
+
args: ['-y', '@azure-devops/mcp', mcpChoices.adoOrg],
|
|
376
|
+
env: { AZURE_DEVOPS_PAT: '${AZURE_DEVOPS_PAT}' },
|
|
377
|
+
};
|
|
378
|
+
}
|
|
379
|
+
|
|
337
380
|
dbType = mcpChoices.db;
|
|
381
|
+
selectedServers = mcpChoices.servers;
|
|
338
382
|
|
|
339
383
|
const mcpPath = join(targetDir, '.mcp.json');
|
|
340
384
|
if (await fs.pathExists(mcpPath)) {
|
|
@@ -501,12 +545,29 @@ async function main() {
|
|
|
501
545
|
console.log(` Database: ${chalk.bold(dbType)}`);
|
|
502
546
|
console.log('');
|
|
503
547
|
|
|
504
|
-
// Show required env vars
|
|
548
|
+
// Show required env vars + a copy-paste command to persist them in the user's shell rc
|
|
549
|
+
const shell = process.env.SHELL || '';
|
|
550
|
+
const rcFile = shell.includes('zsh') ? '~/.zshrc'
|
|
551
|
+
: shell.includes('bash') ? '~/.bashrc'
|
|
552
|
+
: shell.includes('fish') ? '~/.config/fish/config.fish'
|
|
553
|
+
: '~/.zshrc';
|
|
554
|
+
const exports = [];
|
|
555
|
+
if (dbType === 'mongo') exports.push('export MONGODB_CONNECTION_STRING="mongodb+srv://..."');
|
|
556
|
+
if (dbType === 'mssql' || dbType === 'azuresql') exports.push('export MSSQL_CONNECTION_STRING="Server=...;Database=..."');
|
|
557
|
+
if (dbType === 'postgres') exports.push('export POSTGRES_CONNECTION_STRING="postgresql://..."');
|
|
558
|
+
exports.push('export TEAMS_TENANT_ID="..."', 'export TEAMS_CLIENT_ID="..."', 'export TEAMS_CLIENT_SECRET="..."');
|
|
559
|
+
if (selectedServers.includes('azuredevops')) exports.push('export AZURE_DEVOPS_PAT="..." # mint at https://dev.azure.com/_usersSettings/tokens');
|
|
560
|
+
|
|
505
561
|
console.log(chalk.yellow(' Environment variables to set:'));
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
console.log(chalk.gray(
|
|
562
|
+
for (const line of exports) console.log(chalk.gray(` ${line}`));
|
|
563
|
+
console.log('');
|
|
564
|
+
console.log(chalk.yellow(` To persist (replace the "..." placeholders first, then paste into your terminal):`));
|
|
565
|
+
console.log(chalk.gray(` cat <<'EOF' >> ${rcFile}`));
|
|
566
|
+
for (const line of exports) console.log(chalk.gray(` ${line}`));
|
|
567
|
+
console.log(chalk.gray(` EOF`));
|
|
568
|
+
console.log(chalk.gray(` source ${rcFile}`));
|
|
569
|
+
console.log('');
|
|
570
|
+
console.log(chalk.yellow(' Also run:'));
|
|
510
571
|
console.log(chalk.gray(' az login'));
|
|
511
572
|
console.log('');
|
|
512
573
|
console.log(` Then: ${chalk.blue(`cd ${targetDir} && claude`)}`);
|
package/package.json
CHANGED
|
@@ -30,6 +30,13 @@
|
|
|
30
30
|
"azure": {
|
|
31
31
|
"command": "npx",
|
|
32
32
|
"args": ["-y", "@azure/mcp@latest", "server", "start"]
|
|
33
|
+
},
|
|
34
|
+
"azure-devops": {
|
|
35
|
+
"command": "npx",
|
|
36
|
+
"args": ["-y", "@azure-devops/mcp", "your-org"],
|
|
37
|
+
"env": {
|
|
38
|
+
"AZURE_DEVOPS_PAT": "${AZURE_DEVOPS_PAT}"
|
|
39
|
+
}
|
|
33
40
|
}
|
|
34
41
|
}
|
|
35
42
|
}
|