docks-kit 0.1.1 → 0.1.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.
|
@@ -332,6 +332,31 @@ function syncClaudeJson(ctx: Ctx): void {
|
|
|
332
332
|
// -------------------------------------------------------- connector env ----
|
|
333
333
|
|
|
334
334
|
function syncConnectorEnv(ctx: Ctx): void {
|
|
335
|
+
// win32: Claude Code launches from PowerShell/GUI, so the flag must be a
|
|
336
|
+
// real user env var (setx), not a Git-Bash-only shell-rc export. Never
|
|
337
|
+
// clobbers an existing value (set =true yourself to keep connectors).
|
|
338
|
+
if (process.platform === "win32") {
|
|
339
|
+
const existing = spawnSync("reg", ["query", "HKCU\\Environment", "/v", "ENABLE_CLAUDEAI_MCP_SERVERS"], {
|
|
340
|
+
stdio: "ignore"
|
|
341
|
+
})
|
|
342
|
+
if (existing.error === undefined && existing.status === 0) {
|
|
343
|
+
if (ctx.dryRun) echo("[dry-run] ENABLE_CLAUDEAI_MCP_SERVERS already in user environment — would skip")
|
|
344
|
+
else log("claude.ai connectors: ENABLE_CLAUDEAI_MCP_SERVERS already set in user environment (left as-is)")
|
|
345
|
+
return
|
|
346
|
+
}
|
|
347
|
+
if (ctx.dryRun) {
|
|
348
|
+
echo("[dry-run] setx ENABLE_CLAUDEAI_MCP_SERVERS false (user environment)")
|
|
349
|
+
return
|
|
350
|
+
}
|
|
351
|
+
const res = spawnSync("setx", ["ENABLE_CLAUDEAI_MCP_SERVERS", "false"], { stdio: "ignore" })
|
|
352
|
+
if (res.error === undefined && res.status === 0) {
|
|
353
|
+
log("claude.ai connectors disabled via setx (open a new terminal to apply)")
|
|
354
|
+
} else {
|
|
355
|
+
warn("setx ENABLE_CLAUDEAI_MCP_SERVERS false failed — set it manually in System Properties > Environment Variables")
|
|
356
|
+
}
|
|
357
|
+
return
|
|
358
|
+
}
|
|
359
|
+
|
|
335
360
|
const line = "export ENABLE_CLAUDEAI_MCP_SERVERS=false"
|
|
336
361
|
const marker = "# docks-kit: disable claude.ai cloud MCP connectors (set =true to keep them)"
|
|
337
362
|
const candidates = [".zshrc", ".bashrc", ".bash_profile", ".profile", ".zshenv"].map((f) => p(ctx.home, f))
|
|
@@ -182,7 +182,12 @@ export function parseArgs(ctx: Ctx, args: ReadonlyArray<string>): void {
|
|
|
182
182
|
export function preflight(ctx: Ctx): void {
|
|
183
183
|
if (ctx.syncClaude || ctx.syncCodex) {
|
|
184
184
|
if (!commandExists("jq")) {
|
|
185
|
-
|
|
185
|
+
const hint = process.platform === "win32"
|
|
186
|
+
? "winget install jqlang.jq (then open a new terminal)"
|
|
187
|
+
: process.platform === "darwin"
|
|
188
|
+
? "brew install jq"
|
|
189
|
+
: "sudo apt install -y jq"
|
|
190
|
+
err(`jq is required (deployed statusline/hooks call it). Install: ${hint}`)
|
|
186
191
|
throw new ExitError(1)
|
|
187
192
|
}
|
|
188
193
|
}
|
package/package.json
CHANGED