@sechroom/cli 2026.6.31 → 2026.6.32
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/dist/index.js +8 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3371,14 +3371,14 @@ version, the shared template stays clean, and you can discard back anytime.
|
|
|
3371
3371
|
}
|
|
3372
3372
|
function resolveClientKeys(raw) {
|
|
3373
3373
|
const targets = clientTargets(process.cwd());
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
for (const k of
|
|
3374
|
+
const tokens = (Array.isArray(raw) ? raw : [raw]).flatMap((t) => t.split(",")).map((k) => k.trim()).filter(Boolean);
|
|
3375
|
+
if (tokens.includes("all")) return [...ALL_CLIENT_KEYS];
|
|
3376
|
+
for (const k of tokens) {
|
|
3377
3377
|
if (!targets[k]) {
|
|
3378
3378
|
fail(`unknown client '${k}'. Known: ${ALL_CLIENT_KEYS.join(", ")}, or 'all'.`);
|
|
3379
3379
|
}
|
|
3380
3380
|
}
|
|
3381
|
-
return
|
|
3381
|
+
return [...new Set(tokens)];
|
|
3382
3382
|
}
|
|
3383
3383
|
function printActions(client, actions) {
|
|
3384
3384
|
process.stdout.write(`
|
|
@@ -3448,13 +3448,13 @@ async function resolveNamespaceChoice(cfg, flag) {
|
|
|
3448
3448
|
return picked === GLOBAL_NAMESPACE ? null : picked;
|
|
3449
3449
|
}
|
|
3450
3450
|
function registerInit(program2) {
|
|
3451
|
-
program2.command("init").description("Wire this project for sechroom: write MCP config + agent instruction files from the server's setup descriptors").option("--client <list
|
|
3451
|
+
program2.command("init").description("Wire this project for sechroom: write MCP config + agent instruction files from the server's setup descriptors").option("--client <list...>", `clients to wire \u2014 space- or comma-separated (${ALL_CLIENT_KEYS.join(", ")}) or 'all'`, DEFAULT_CLIENT_KEY).option("--dry-run", "print what would be written without writing", false).option("--mcp-only", "only write MCP config (skip agent files)", false).option("--agent-files-only", "only write agent instruction files (skip MCP config)", false).option("--copy", "make a personal copy of the agent instructions you can edit (default: prompt on a TTY, else skip)").option("--namespace <slug>", "MCP namespace for the connection URL (interactive picker if omitted on a TTY; defaults to tenant-global)").option("--refresh", "refresh out-of-date agent-file blocks in place (local edits preserved to .proposed)", false).option("--force", "rewrite agent-file managed blocks, overwriting local edits inside the markers", false).option("--check", "report whether agent files would change and exit (0 = current, 1 = stale/drift/absent); writes nothing", false).addHelpText(
|
|
3452
3452
|
"after",
|
|
3453
3453
|
`
|
|
3454
3454
|
Examples:
|
|
3455
3455
|
$ sechroom init Claude Code (default): ./.mcp.json + ./CLAUDE.md
|
|
3456
3456
|
$ sechroom init --client all claude-code, claude-desktop, codex, cursor
|
|
3457
|
-
$ sechroom init --client codex
|
|
3457
|
+
$ sechroom init --client codex cursor space-separated (comma also works)
|
|
3458
3458
|
$ sechroom init --mcp-only just the MCP config (skip agent files)
|
|
3459
3459
|
$ sechroom init --dry-run --json preview the writes, change nothing`
|
|
3460
3460
|
).action(async (opts, cmd) => {
|
|
@@ -4079,7 +4079,7 @@ async function ensureTimezone(cfg, opts) {
|
|
|
4079
4079
|
return { timezone: tz, action: "set" };
|
|
4080
4080
|
}
|
|
4081
4081
|
async function chooseClients(clientFlag, yes, cwd) {
|
|
4082
|
-
if (clientFlag) return resolveClientKeys(clientFlag);
|
|
4082
|
+
if (clientFlag && clientFlag.length > 0) return resolveClientKeys(clientFlag);
|
|
4083
4083
|
const detected = detectInstalledClients(cwd);
|
|
4084
4084
|
const preselected = detected.length > 0 ? detected : [DEFAULT_CLIENT_KEY];
|
|
4085
4085
|
if (!canPrompt() || yes) return preselected;
|
|
@@ -4200,7 +4200,7 @@ async function runRecurse(cfg, g, opts) {
|
|
|
4200
4200
|
summarizeFanout(results, { dryRun });
|
|
4201
4201
|
}
|
|
4202
4202
|
function registerOnboard(program2) {
|
|
4203
|
-
program2.command("onboard").description("Guided first-run setup: configure, sign in, set timezone, detect clients, and wire this project").option("--recurse", "orchestration-root mode: onboard every child repo under this dir (auto-discovered, or from ./.sechroom/repos.json) \u2014 refreshes bound repos, prompts a workspace per new one", false).option("--lane <id>", "set the code-lane (substrate source identity) explicitly instead of inferring it; with --recurse it's used for every child repo").option("--design-lane <id>", "set the design-lane explicitly (substrate-authoring identity); with --recurse applies to every child").option("--client <list
|
|
4203
|
+
program2.command("onboard").description("Guided first-run setup: configure, sign in, set timezone, detect clients, and wire this project").option("--recurse", "orchestration-root mode: onboard every child repo under this dir (auto-discovered, or from ./.sechroom/repos.json) \u2014 refreshes bound repos, prompts a workspace per new one", false).option("--lane <id>", "set the code-lane (substrate source identity) explicitly instead of inferring it; with --recurse it's used for every child repo").option("--design-lane <id>", "set the design-lane explicitly (substrate-authoring identity); with --recurse applies to every child").option("--client <list...>", `clients to wire \u2014 space- or comma-separated (${ALL_CLIENT_KEYS.join(", ")}) or 'all' (default: auto-detected)`).option("--local", "save the binding (tenant + base URL + workspace) to a committed .sechroom.json in this repo instead of the global config", false).option("--here", "with --local: write the binding at THIS directory even when a parent already carries one \u2014 binds a subtree (e.g. a monorepo's frontend/) to its own workspace", false).option("--workspace <id>", "bind this directory to a workspace (skips the interactive workspace pick)").option("--cli-only", "configure the CLI only \u2014 don't wire any AI client (no MCP config, no agent files)", false).option("--no-mcp", "skip the MCP server config (.mcp.json etc.); still write the agent instruction files").option("--copy", "make a personal copy of the agent instructions you can edit (default: prompt on a TTY, else skip)").option("--dry-run", "walk through without writing files or changing the profile", false).option("--refresh", "re-fetch descriptors and refresh any out-of-date managed blocks (local edits preserved to .proposed)", false).option("--force", "rewrite every managed block, overwriting local edits inside the markers (content outside untouched)", false).option("--check", "report whether anything would change and exit (0 = all current, 1 = stale/drift/absent); writes nothing", false).option("-y, --yes", "non-interactive: accept defaults (system timezone, detected clients, global config, full wire)", false).addHelpText(
|
|
4204
4204
|
"after",
|
|
4205
4205
|
`
|
|
4206
4206
|
Examples:
|
package/package.json
CHANGED