@paradigma-inc/flywheel 0.2.4 → 0.2.5

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
@@ -24,8 +24,9 @@ The script installs `@paradigma-inc/flywheel@latest` into the managed user
24
24
  prefix `${FLYWHEEL_INSTALL_PREFIX:-$HOME/.local}`, adds a marked PATH block
25
25
  when needed, and then runs guided `flywheel setup` through the installed binary.
26
26
  In an interactive terminal, setup asks whether you want MCP host setup or
27
- CLI-only setup. You can read the full source at the same URL without piping to
28
- `sh`.
27
+ CLI-only setup. Setup then asks where to install: Project (this folder) or
28
+ Global (your machine), with Global preselected. You can read the full source
29
+ at the same URL without piping to `sh`.
29
30
 
30
31
  Prefer the two-step npm recipe? It still works:
31
32
 
@@ -186,6 +187,7 @@ Mode behavior:
186
187
  If mode is omitted:
187
188
 
188
189
  - interactive TTY: prompt for `mcp` or `cli` (default `mcp`)
190
+ - location: Where should Flywheel be installed? (default Global)
189
191
  - non-interactive: fails with usage error (`exit 2`)
190
192
 
191
193
  ## Public Base URL Rules
@@ -329,6 +331,7 @@ full details.
329
331
 
330
332
  - Default scope (no `--project`) is user-level/global.
331
333
  - `--project` is the explicit repo-local override.
334
+ - Interactive setup asks for the install location (Global preselected) when `--project` is omitted.
332
335
 
333
336
  Examples:
334
337
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paradigma-inc/flywheel",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "description": "One-command setup for Flywheel MCP hosts",
5
5
  "type": "module",
6
6
  "files": [
package/src/cli.mjs CHANGED
@@ -368,9 +368,9 @@ function validateCliModeFlags(options) {
368
368
  }
369
369
  }
370
370
 
371
- async function runCliModeCommand(options, readStdinAuth) {
371
+ async function runCliModeCommand(options, readStdinAuth, contextScope) {
372
372
  validateCliModeFlags(options);
373
- const scope = options.project ? "project" : "global";
373
+ const scope = contextScope ?? (options.project ? "project" : "global");
374
374
  const baseUrl = normalizeBaseUrl(
375
375
  resolveSetupBaseUrl({ explicitBaseUrl: options.baseUrl }),
376
376
  );
@@ -450,9 +450,10 @@ async function runSetupCommandViaRouter(options) {
450
450
  isInteractive:
451
451
  isatty(0) && process.stdout.isTTY === true,
452
452
  promptMode: promptSetupMode,
453
- runMcpMode: async ({ readStdinAuth }) =>
453
+ runMcpMode: async ({ readStdinAuth, scope }) =>
454
454
  await runMcpModeCommand(options, {
455
455
  readStdinAuth,
456
+ scope,
456
457
  force: options.force === true,
457
458
  reconcilePriorMode: async ({
458
459
  hostNames,
@@ -480,7 +481,8 @@ async function runSetupCommandViaRouter(options) {
480
481
  }
481
482
  },
482
483
  }),
483
- runCliMode: async ({ readStdinAuth }) => await runCliModeCommand(options, readStdinAuth),
484
+ runCliMode: async ({ readStdinAuth, scope }) =>
485
+ await runCliModeCommand(options, readStdinAuth, scope),
484
486
  });
485
487
  }
486
488
 
@@ -1360,7 +1362,7 @@ Configure the Flywheel CLI, MCP host entries, and bundled skills without changin
1360
1362
  .optionsGroup("Scope:")
1361
1363
  .option(
1362
1364
  "-p, --project",
1363
- "Configure for current project instead of globally",
1365
+ "Configure for current project instead of globally; setup asks interactively when omitted",
1364
1366
  )
1365
1367
  .option("-y, --yes", "Skip confirmation prompts")
1366
1368
  .optionsGroup("Authentication:")
@@ -1,6 +1,7 @@
1
1
  import { resolveSetupMode } from "./mode.mjs";
2
2
  import { recordResolvedMode } from "./resolved-selection-record.mjs";
3
3
  import { createSetupStdinAuthReader } from "../setup-auth.mjs";
4
+ import { resolveInteractiveSetupScope } from "./install-scope.mjs";
4
5
 
5
6
  export async function runSetupRouter(options = {}, deps = {}) {
6
7
  const mode = await resolveSetupMode(options, {
@@ -11,10 +12,15 @@ export async function runSetupRouter(options = {}, deps = {}) {
11
12
  ? createSetupStdinAuthReader(options, deps.stdin)
12
13
  : undefined;
13
14
  recordResolvedMode(mode, deps);
15
+ const scope = await resolveInteractiveSetupScope(options, {
16
+ allowPrompt: deps.isInteractive === true && options.yes !== true,
17
+ promptLocation: deps.promptInstallLocation,
18
+ });
14
19
  const context = {
15
20
  mode,
16
21
  options,
17
22
  readStdinAuth,
23
+ scope,
18
24
  };
19
25
 
20
26
  if (mode === "mcp") {
@@ -605,7 +605,7 @@ export async function runMcpModeCommand(options, deps = {}) {
605
605
  );
606
606
  }
607
607
 
608
- const scope = options.project ? "project" : "global";
608
+ const scope = deps.scope ?? (options.project ? "project" : "global");
609
609
  const baseUrl = normalizeBaseUrl(
610
610
  resolveSetupBaseUrl({ explicitBaseUrl: options.baseUrl }),
611
611
  );