@supercollab/cli 0.4.6 → 0.4.8

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/README.md CHANGED
@@ -156,6 +156,15 @@ cd /path/to/project
156
156
  supercollab mcp install --client claude-code
157
157
  ```
158
158
 
159
+ The same installer is available without typing the command:
160
+
161
+ ```text
162
+ supercollab -> Settings -> Install Claude Code MCP
163
+ ```
164
+
165
+ During first-run setup, choose `Install Claude Code MCP` at the MCP setup step
166
+ to run the installer immediately.
167
+
159
168
  The installer first runs the MCP smoke check, then calls Claude Code's own
160
169
  `claude mcp add` with absolute Node and CLI paths plus explicit `HOME`, `PATH`,
161
170
  and `SUPERCOLLAB_WORKDIR` values. This avoids Homebrew, nvm, shell startup, and
@@ -8,7 +8,7 @@ import { fileURLToPath } from 'node:url';
8
8
  import * as readlineCore from 'node:readline';
9
9
  import { stdin as input, stdout as output } from 'node:process';
10
10
 
11
- const VERSION = '0.4.6';
11
+ const VERSION = '0.4.8';
12
12
  const CLI_ENTRY = fileURLToPath(import.meta.url);
13
13
  const DEFAULT_SERVER = process.env.SUPERCOLLAB_URL || 'https://hyper.polynode.dev';
14
14
  const DEFAULT_CONFIG = process.env.SUPERCOLLAB_CONFIG || path.join(os.homedir(), '.supercollab', 'config.json');
@@ -1830,10 +1830,10 @@ function claudeCodeInstallPlan(file, opts = {}) {
1830
1830
  const args = [
1831
1831
  'mcp', 'add',
1832
1832
  '--scope', scope,
1833
+ '-e', `HOME=${env.HOME}`,
1834
+ '-e', `PATH=${env.PATH}`,
1835
+ '-e', `SUPERCOLLAB_WORKDIR=${env.SUPERCOLLAB_WORKDIR}`,
1833
1836
  '--transport', 'stdio',
1834
- '--env', `HOME=${env.HOME}`,
1835
- '--env', `PATH=${env.PATH}`,
1836
- '--env', `SUPERCOLLAB_WORKDIR=${env.SUPERCOLLAB_WORKDIR}`,
1837
1837
  'supercollab',
1838
1838
  '--',
1839
1839
  process.execPath,
@@ -2210,9 +2210,9 @@ async function promptAccountStatus(config, file, prompts) {
2210
2210
 
2211
2211
  async function promptMcpConfig(config, file, prompts) {
2212
2212
  const client = await prompts.select({
2213
- message: 'MCP client config',
2213
+ message: 'MCP setup',
2214
2214
  options: [
2215
- { value: 'claude-code', label: 'Claude Code', hint: 'one-command installer' },
2215
+ { value: 'claude-code', label: 'Install Claude Code MCP', hint: 'runs claude mcp add now' },
2216
2216
  { value: 'codex', label: 'Codex', hint: 'TOML config snippet' },
2217
2217
  { value: 'claude', label: 'Claude', hint: 'JSON config snippet' },
2218
2218
  { value: 'manual', label: 'Manual', hint: 'stdio command' },
@@ -2220,18 +2220,21 @@ async function promptMcpConfig(config, file, prompts) {
2220
2220
  ],
2221
2221
  });
2222
2222
  if (prompts.isCancel(client) || client === 'back') return;
2223
+ if (client === 'claude-code') return promptInstallClaudeCode(config, file, prompts);
2223
2224
  prompts.note(mcpConfigText(client, file), `${client} MCP config`);
2224
2225
  }
2225
2226
 
2226
- async function promptInstallClaudeCode(config, file, prompts) {
2227
+ async function promptInstallClaudeCode(config, file, prompts, options = {}) {
2228
+ const defaultCwd = path.resolve(String(options.cwd || process.cwd()));
2227
2229
  const cwd = await prompts.text({
2228
2230
  message: 'Claude Code project directory',
2229
- defaultValue: process.cwd(),
2230
- placeholder: process.cwd(),
2231
+ defaultValue: defaultCwd,
2232
+ placeholder: defaultCwd,
2231
2233
  validate: (value) => fs.existsSync(path.resolve(String(value || ''))) ? undefined : 'Directory does not exist',
2232
2234
  });
2233
2235
  if (prompts.isCancel(cwd)) throw new Error('cancelled');
2234
- const scope = await prompts.select({
2236
+ let scope = options.scope || null;
2237
+ if (!scope) scope = await prompts.select({
2235
2238
  message: 'Claude Code MCP scope',
2236
2239
  options: [
2237
2240
  { value: 'local', label: 'Local project', hint: 'recommended; private to this project' },
@@ -2408,7 +2411,7 @@ async function runSettingsMenu(config, file, prompts) {
2408
2411
  { value: 'doctor', label: 'System check / install BGE model' },
2409
2412
  { value: 'account', label: 'Account and config status' },
2410
2413
  { value: 'install_claude_code', label: 'Install Claude Code MCP' },
2411
- { value: 'mcp', label: 'Show MCP config' },
2414
+ { value: 'mcp', label: 'MCP setup/config' },
2412
2415
  { value: 'sessions', label: 'Manage sessions' },
2413
2416
  { value: 'server', label: 'Set server URL' },
2414
2417
  { value: 'back', label: 'Back' },
@@ -2493,9 +2496,9 @@ async function runSetupWizard(config, file, opts = {}) {
2493
2496
  const smoke = await runSetupSmoke(config, file, roomId, prompts);
2494
2497
 
2495
2498
  const client = await prompts.select({
2496
- message: 'MCP client config',
2499
+ message: 'MCP setup',
2497
2500
  options: [
2498
- { value: 'claude-code', label: 'Claude Code', hint: 'one-command installer' },
2501
+ { value: 'claude-code', label: 'Install Claude Code MCP', hint: 'runs claude mcp add now' },
2499
2502
  { value: 'codex', label: 'Codex', hint: 'TOML config snippet' },
2500
2503
  { value: 'claude', label: 'Claude', hint: 'JSON config snippet' },
2501
2504
  { value: 'manual', label: 'Manual', hint: 'stdio command' },
@@ -2513,7 +2516,9 @@ async function runSetupWizard(config, file, opts = {}) {
2513
2516
  };
2514
2517
  saveConfig(config, file);
2515
2518
 
2516
- if (client !== 'skip') {
2519
+ if (client === 'claude-code') {
2520
+ await promptInstallClaudeCode(config, file, prompts, { cwd: activation?.cwd || process.cwd(), scope: 'local' });
2521
+ } else if (client !== 'skip') {
2517
2522
  prompts.note(mcpConfigText(client, file), `${client} MCP config`);
2518
2523
  }
2519
2524
  prompts.outro(`Ready. Config saved at ${file}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supercollab/cli",
3
- "version": "0.4.6",
3
+ "version": "0.4.8",
4
4
  "description": "SuperCollab CLI and MCP bridge for encrypted local-search agent group chat.",
5
5
  "type": "module",
6
6
  "bin": {