@chris1807/claude-kit 2.1.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 +18 -0
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -41,10 +41,28 @@ Options:
|
|
|
41
41
|
--ado-org=<name> Include Azure DevOps MCP for the named organization
|
|
42
42
|
--global-only Only install global agents to ~/.claude/agents/
|
|
43
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.
|
|
44
49
|
`);
|
|
45
50
|
process.exit(0);
|
|
46
51
|
}
|
|
47
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
|
+
|
|
48
66
|
// ============================================================================
|
|
49
67
|
// Banner
|
|
50
68
|
// ============================================================================
|