@genrupt/cli 0.1.4 → 0.1.6

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
@@ -6,20 +6,14 @@ Genrupt CLI for local-file workflows and local MCP clients.
6
6
 
7
7
  Use this when setting up Genrupt for an agent:
8
8
 
9
- Windows user-local launcher:
10
-
11
- ```powershell
12
- powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "irm https://genrupt.com/downloads/genrupt-cli/install.ps1 | iex"
13
- genrupt agent install
14
- ```
15
-
16
- Universal one-time run:
9
+ Install the CLI:
17
10
 
18
11
  ```bash
19
- npx -y @genrupt/cli@latest agent install
12
+ npm install -g @genrupt/cli@latest
13
+ genrupt agent install
20
14
  ```
21
15
 
22
- This checks auth, installs Genrupt skills for the detected agent, and writes a local runtime manifest. The user-local launcher avoids `npm install -g`; the `npx` runtime install still tries to install or update the global CLI, but global npm install failures do not block the skills/runtime setup.
16
+ This checks auth, installs Genrupt skills for the detected agent, and writes a local runtime manifest.
23
17
 
24
18
  ## Install
25
19
 
@@ -35,10 +29,10 @@ macOS/Linux:
35
29
  curl -fsSL https://genrupt.com/downloads/genrupt-cli/install.sh | sh
36
30
  ```
37
31
 
38
- Optional global npm install:
32
+ If global npm install is restricted, run without installing globally:
39
33
 
40
34
  ```bash
41
- npm install -g @genrupt/cli
35
+ npx -y @genrupt/cli@latest agent install
42
36
  ```
43
37
 
44
38
  ## Login
package/dist/cli.js CHANGED
@@ -360,5 +360,5 @@ main().catch(async (error) => {
360
360
  ? await buildUnknownCommandUpdateHint()
361
361
  : "";
362
362
  console.error(`${message}${updateHint}`);
363
- process.exit(1);
363
+ process.exitCode = 1;
364
364
  });
package/dist/constants.js CHANGED
@@ -3,5 +3,5 @@ export const DEFAULT_MCP_SERVER_URL = `${DEFAULT_ORIGIN}/api/agent/mcp`;
3
3
  export const OAUTH_DEVICE_GRANT_TYPE = "urn:ietf:params:oauth:grant-type:device_code";
4
4
  export const OAUTH_SCOPE = "mcp";
5
5
  export const CLI_CLIENT_NAME = "Genrupt CLI";
6
- export const CLI_VERSION = "0.1.4";
6
+ export const CLI_VERSION = "0.1.6";
7
7
  export const ACCESS_TOKEN_REFRESH_SKEW_MS = 60_000;
package/dist/doctor.js CHANGED
@@ -2,7 +2,7 @@ import { existsSync } from "node:fs";
2
2
  import path from "node:path";
3
3
  import { getValidConfig } from "./auth.js";
4
4
  import { CLI_VERSION } from "./constants.js";
5
- import { buildNoGlobalInstallRemediation, collectGlobalCliDiagnostics, readGlobalCliInstallFailure, } from "./globalCli.js";
5
+ import { buildNoGlobalInstallRemediation, clearGlobalCliInstallFailure, collectGlobalCliDiagnostics, readGlobalCliInstallFailure, } from "./globalCli.js";
6
6
  import { listRemoteMcpTools } from "./mcpClient.js";
7
7
  import { GENRUPT_SKILL_NAMES, computeInstalledSkillDigests, defaultTargetForAgent, detectAgent, getInstalledRuntimeManifestPath, readInstalledRuntimeManifest, } from "./skills.js";
8
8
  import { emitRuntimeTelemetry } from "./telemetry.js";
@@ -160,9 +160,16 @@ export async function runDoctor(options = {}) {
160
160
  const globalCliDiagnostics = await collectGlobalCliDiagnostics();
161
161
  checks.push(buildPackageManagerCheck(globalCliDiagnostics));
162
162
  checks.push(buildGlobalCliCheck(globalCliDiagnostics));
163
- const lastInstallFailureCheck = buildLastGlobalInstallFailureCheck(await readGlobalCliInstallFailure());
164
- if (lastInstallFailureCheck) {
165
- checks.push(lastInstallFailureCheck);
163
+ const globalCliCurrent = globalCliDiagnostics.globalCliVersion &&
164
+ !isVersionNewer(CLI_VERSION, globalCliDiagnostics.globalCliVersion);
165
+ if (globalCliCurrent) {
166
+ await clearGlobalCliInstallFailure().catch(() => { });
167
+ }
168
+ else {
169
+ const lastInstallFailureCheck = buildLastGlobalInstallFailureCheck(await readGlobalCliInstallFailure());
170
+ if (lastInstallFailureCheck) {
171
+ checks.push(lastInstallFailureCheck);
172
+ }
166
173
  }
167
174
  try {
168
175
  const latestVersion = await fetchLatestCliVersion();
package/dist/globalCli.js CHANGED
@@ -180,10 +180,11 @@ export function buildGlobalCliDiagnosticsLines(diagnostics) {
180
180
  }
181
181
  export function buildNoGlobalInstallRemediation() {
182
182
  return [
183
- "Install the user-local launcher without npm global writes:",
184
- ` powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "irm https://genrupt.com/downloads/genrupt-cli/install.ps1 | iex"`,
183
+ `Update the global CLI:`,
184
+ ` npm install -g ${CLI_PACKAGE_NAME}@latest`,
185
185
  "Or keep using npx:",
186
186
  ` npx -y ${CLI_PACKAGE_NAME}@latest doctor`,
187
- "If you want the global npm command, check that npm's global prefix is writable or run the install from an elevated terminal.",
187
+ "If global npm install is restricted, install the user-local launcher:",
188
+ ` powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "irm https://genrupt.com/downloads/genrupt-cli/install.ps1 | iex"`,
188
189
  ];
189
190
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@genrupt/cli",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "Genrupt CLI for OAuth login, local file uploads, and local MCP bridge setup.",
5
5
  "license": "MIT",
6
6
  "repository": {