@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 +6 -12
- package/dist/cli.js +1 -1
- package/dist/constants.js +1 -1
- package/dist/doctor.js +11 -4
- package/dist/globalCli.js +4 -3
- package/package.json +1 -1
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
|
-
|
|
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
|
-
|
|
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.
|
|
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
|
-
|
|
32
|
+
If global npm install is restricted, run without installing globally:
|
|
39
33
|
|
|
40
34
|
```bash
|
|
41
|
-
|
|
35
|
+
npx -y @genrupt/cli@latest agent install
|
|
42
36
|
```
|
|
43
37
|
|
|
44
38
|
## Login
|
package/dist/cli.js
CHANGED
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.
|
|
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
|
|
164
|
-
|
|
165
|
-
|
|
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
|
-
|
|
184
|
-
`
|
|
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
|
|
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
|
}
|