@xevy/cli 0.1.6 → 0.1.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.
Files changed (3) hide show
  1. package/README.md +99 -4
  2. package/bin/xevy.mjs +103 -34
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -1,10 +1,79 @@
1
1
  # @xevy/cli
2
2
 
3
- The **`xevy`** command — set up and launch the [pi](https://github.com/badlogic/pi-mono) agent with Xevy.
3
+ The **`xevy`** command — set up and launch the [pi](https://github.com/badlogic/pi-mono) agent with Xevy, the free AI workspace for digital business.
4
+
5
+ New here? Follow **Get started** below from top to bottom — it takes about five minutes.
6
+
7
+ ## Get started
8
+
9
+ ### 1. Create your Xevy account
10
+
11
+ Xevy is free. Register (or log in if you already have an account) in the browser first:
12
+
13
+ - **Register:** <https://xevy.ai/register>
14
+ - **Log in:** <https://xevy.ai/login>
15
+
16
+ ### 2. Make sure you have Node.js
17
+
18
+ The CLI runs on [Node.js](https://nodejs.org/) 18 or newer. Check what you have:
19
+
20
+ ```bash
21
+ node --version # should print v18.x.x or higher
22
+ ```
23
+
24
+ If the command isn't found or the version is too old, install the latest LTS from
25
+ <https://nodejs.org/> and try again. `npm` ships with Node, so you get it automatically.
26
+
27
+ ### 3. Install the CLI
28
+
29
+ Install globally so the `xevy` command is available everywhere on your machine:
4
30
 
5
31
  ```bash
6
- npx @xevy/cli setup # one-time: install pi + the Xevy extension + your API key
7
- npx @xevy/cli # open pi with the Xevy extension loaded
32
+ npm install -g @xevy/cli
33
+ ```
34
+
35
+ > Prefer not to install anything? You can run every command below with `npx @xevy/cli`
36
+ > instead of `xevy` — e.g. `npx @xevy/cli setup`. It's slower each run but installs nothing.
37
+
38
+ ### 4. Run the one-time setup
39
+
40
+ ```bash
41
+ xevy setup
42
+ ```
43
+
44
+ This walks you through everything:
45
+
46
+ 1. Installs the **pi agent** if it isn't already on your PATH.
47
+ 2. Installs the Xevy extensions (see [`xevy setup`](#xevy-setup) for details).
48
+ 3. Installs the Xevy **SDLC skills** for Claude Code / Cursor / Codex (via `@xevy/skills`).
49
+ 4. Asks for your **API key**. When prompted, open the link it prints — it takes you
50
+ straight to **Settings → Profile → API keys** at
51
+ <https://xevy.ai/settings?section=profile&tab=api> — click **Create key**, copy the
52
+ key, and paste it back into the terminal. Your key is saved to
53
+ `~/.config/xevy/credentials` and never printed again.
54
+
55
+ ### 5. Start working
56
+
57
+ ```bash
58
+ xevy # open an interactive pi session with Xevy loaded
59
+ xevy "summarise this repo" # or send a one-off prompt
60
+ ```
61
+
62
+ That's it — you're set up. The sections below are reference for when you need more detail.
63
+
64
+ ## Upgrading
65
+
66
+ Keep the Xevy extensions and SDLC skills current (run after Xevy releases):
67
+
68
+ ```bash
69
+ xevy check # is a newer skills version available?
70
+ xevy update # refresh the pi extensions + the SDLC skills
71
+ ```
72
+
73
+ To upgrade the CLI binary itself:
74
+
75
+ ```bash
76
+ npm update -g @xevy/cli # or re-run: npm install -g @xevy/cli
8
77
  ```
9
78
 
10
79
  ## `xevy setup`
@@ -18,10 +87,24 @@ npx @xevy/cli # open pi with the Xevy extension loaded
18
87
  3. Asks for your **API key** (reuses an already-saved one if present) and prints a
19
88
  **direct link to the API-keys tab** to generate one, then stores it in
20
89
  `~/.config/xevy/credentials` (mode `600`, never printed).
90
+ 4. Installs the Xevy **SDLC skills** into `.claude/skills`, `.cursor/skills`, etc.
91
+ (delegates to `@xevy/skills` — skills only; the MCP tools for pi are already
92
+ wired through the extensions above). A skills hiccup only warns; it never aborts
93
+ the setup that already succeeded.
21
94
 
22
95
  The API-keys link opens **Settings → Profile → API keys** directly:
23
96
  `https://xevy.ai/settings?section=profile&tab=api`.
24
97
 
98
+ ## `xevy update` / `xevy check`
99
+
100
+ ```bash
101
+ xevy update # re-download the pi extensions + update the SDLC skills
102
+ xevy check # report whether newer SDLC skills are available (exit 2 = update available)
103
+ ```
104
+
105
+ `update` refreshes the extensions from the server and the skills via `@xevy/skills`;
106
+ your saved API key is left untouched. Both accept `--base <url>` for self-hosted hosts.
107
+
25
108
  ## `xevy`
26
109
 
27
110
  Opens pi, loading `~/.xevy/extensions` via `pi -e …` (pi also auto-loads the
@@ -40,8 +123,20 @@ xevy "summarise this repo" # forwards the prompt to pi
40
123
  -h, --help Show help
41
124
  ```
42
125
 
126
+ ## Skills & MCP for other agents
127
+
128
+ `xevy setup` already installs the Xevy **SDLC skills** for **Cursor, Claude Code, and
129
+ [50+ other agents](https://github.com/vercel-labs/skills#supported-agents)**. To also
130
+ register the **Xevy MCP server** in those clients (pi gets it via the extensions), add
131
+ it over OAuth (Cursor: Settings → MCP → `xevy`; Claude Code: browser sign-in on first
132
+ use) or run the sibling package's MCP step:
133
+
43
134
  ```bash
44
- XEVY_BASE=https://xevy.vyte.dev npx @xevy/cli setup
135
+ npx @xevy/skills mcp # register the Xevy MCP server, global by default
136
+ npx @xevy/skills # or: skills + MCP together
45
137
  ```
46
138
 
139
+ See the [`@xevy/skills` README](../xevy-skills/README.md) for the full command list,
140
+ per-agent flags, and manual install steps.
141
+
47
142
  Docs: <https://xevy.ai/docs/mcp>
package/bin/xevy.mjs CHANGED
@@ -4,7 +4,10 @@
4
4
  *
5
5
  * xevy setup Install the pi agent (if missing); install the Xevy extensions
6
6
  * (core + model + MCP globally, xevy.ts into ~/.xevy/extensions);
7
- * and store your API key.
7
+ * install the Xevy SDLC skills (via @xevy/skills); and store your
8
+ * API key.
9
+ * xevy update Refresh the pi extensions + the Xevy SDLC skills.
10
+ * xevy check Report whether newer Xevy SDLC skills are available.
8
11
  * xevy Open pi with the Xevy extensions.
9
12
  *
10
13
  * `xevy setup` fetches the extensions from the server and asks for an API key
@@ -67,7 +70,9 @@ function usage() {
67
70
  console.log(`Xevy CLI
68
71
 
69
72
  xevy Open pi with the Xevy extensions in ~/.xevy/extensions
70
- xevy setup [--base u] Install pi (if missing) + the Xevy extensions, store your API key
73
+ xevy setup [--base u] Install pi (if missing) + the Xevy extensions + SDLC skills, store your API key
74
+ xevy update [--base u] Refresh the pi extensions + the Xevy SDLC skills
75
+ xevy check [--base u] Report whether newer Xevy SDLC skills are available
71
76
 
72
77
  Options:
73
78
  --base <url> Xevy host (default: XEVY_BASE or ${DEFAULT_BASE})
@@ -76,8 +81,13 @@ Options:
76
81
 
77
82
  Examples:
78
83
  npx @xevy/cli setup
84
+ npx @xevy/cli update
79
85
  npx @xevy/cli
80
- XEVY_BASE=https://xevy.vyte.dev npx @xevy/cli setup`);
86
+
87
+ Install globally to drop the npx prefix:
88
+ npm install -g @xevy/cli
89
+ xevy setup
90
+ xevy`);
81
91
  }
82
92
 
83
93
  function parseArgv(argv) {
@@ -90,9 +100,9 @@ function parseArgv(argv) {
90
100
  if (first === "-h" || first === "--help" || first === "help") return { command: "help", base };
91
101
  if (first === "-v" || first === "--version") return { command: "version", base };
92
102
 
93
- if (first === "setup") {
94
- args.shift();
95
- const opts = { command: "setup", base, piArgs: [] };
103
+ if (first === "setup" || first === "update" || first === "check") {
104
+ const command = args.shift();
105
+ const opts = { command, base, piArgs: [] };
96
106
  while (args.length > 0) {
97
107
  const a = args.shift();
98
108
  if (a === "--base") {
@@ -101,7 +111,7 @@ function parseArgv(argv) {
101
111
  opts.base = v.replace(/\/$/, "");
102
112
  continue;
103
113
  }
104
- die(`Unknown option for \`xevy setup\`: ${a}. Try \`xevy --help\`.`);
114
+ die(`Unknown option for \`xevy ${command}\`: ${a}. Try \`xevy --help\`.`);
105
115
  }
106
116
  return opts;
107
117
  }
@@ -137,6 +147,26 @@ function ensurePi() {
137
147
  }
138
148
  }
139
149
 
150
+ // Install the Xevy SDLC skills (into .claude/skills, .cursor/skills, etc.) via
151
+ // the published @xevy/skills package. Skills only — the pi tools + MCP are
152
+ // already wired through the extensions above and the stored credentials, so we
153
+ // skip add-mcp here. Non-fatal: the core pi setup has already succeeded, so a
154
+ // skills hiccup warns with the manual command instead of aborting.
155
+ function installSkills(base) {
156
+ const args = ["--yes", "@xevy/skills", "skills", "-y"];
157
+ if (base !== DEFAULT_BASE) args.push("--base", base);
158
+ const label = "npx @xevy/skills skills (Xevy SDLC skills)";
159
+ console.log(`→ ${label}`);
160
+ const command = isWindows ? "npx.cmd" : "npx";
161
+ const r = spawnSync(command, args, { stdio: "inherit", shell: isWindows, env: process.env });
162
+ if (r.error || r.status !== 0) {
163
+ console.warn(`⚠ Could not install Xevy skills (${r.error ? r.error.message : `exit ${r.status}`}).`);
164
+ console.warn(" Install them later with: npx @xevy/skills skills -y");
165
+ return false;
166
+ }
167
+ return true;
168
+ }
169
+
140
170
  async function downloadExtension(base, file, destDir, markers) {
141
171
  const url = `${base}/${file}`;
142
172
  console.log(`→ Downloading ${url}`);
@@ -228,39 +258,33 @@ async function promptNewApiKey(base) {
228
258
  return token;
229
259
  }
230
260
 
261
+ // Download all four Xevy pi extensions to their install dirs. Shared by `setup`
262
+ // and `update` so the two never drift.
263
+ // • xevy-core.ts → pi's GLOBAL extensions dir (shared base: ask_question
264
+ // tool + setup/context). Global so it loads in EVERY pi session and is
265
+ // always present for xevy.ts (which requires it). Global-only avoids a
266
+ // double-load: if it were also in ~/.xevy it'd register ask_question twice.
267
+ // • xevy-model.ts → GLOBAL too, so the xevy/* models are available in every
268
+ // pi session (plain `pi` included), not just via `xevy`.
269
+ // • xevy-mcp.ts → GLOBAL too — the MCP→pi tool bridge (auth reused from
270
+ // the model login), available in every pi session.
271
+ // • xevy.ts → ~/.xevy/extensions (tools/workflow; loaded by `xevy`,
272
+ // which also auto-loads the global dir → core + model + MCP come along).
273
+ async function downloadAllExtensions(base) {
274
+ await downloadExtension(base, "xevy-core.ts", PI_EXTENSION_DIR, ["xevyCoreExtension", "registerCommand"]);
275
+ await downloadExtension(base, "xevy-model.ts", PI_EXTENSION_DIR, ["xevyModelExtension", "registerCommand"]);
276
+ await downloadExtension(base, "xevy-mcp.ts", PI_EXTENSION_DIR, ["xevyMcpExtension", "registerCommand"]);
277
+ await downloadExtension(base, XEVY_EXTENSION_FILE, XEVY_EXTENSIONS_DIR, ["EXTENSION_VERSION", "registerCommand"]);
278
+ }
279
+
231
280
  async function setup(opts) {
232
281
  console.log("Setting up Xevy for pi\n");
233
282
 
234
283
  // 1. Ensure pi is installed (installs it if missing).
235
284
  ensurePi();
236
285
 
237
- // 2. Extensions:
238
- // • xevy-core.ts → pi's GLOBAL extensions dir (shared base: ask_question
239
- // tool + setup/context). Global so it loads in EVERY pi session and is
240
- // always present for xevy.ts (which requires it). Global-only avoids a
241
- // double-load: if it were also in ~/.xevy it'd register ask_question twice.
242
- // • xevy-model.ts → GLOBAL too, so the xevy/* models are available in every
243
- // pi session (plain `pi` included), not just via `xevy`.
244
- // • xevy-mcp.ts → GLOBAL too — the MCP→pi tool bridge (auth reused from
245
- // the model login), available in every pi session.
246
- // • xevy.ts → ~/.xevy/extensions (tools/workflow; loaded by `xevy`,
247
- // which also auto-loads the global dir → core + model + MCP come along).
248
- await downloadExtension(opts.base, "xevy-core.ts", PI_EXTENSION_DIR, [
249
- "xevyCoreExtension",
250
- "registerCommand",
251
- ]);
252
- await downloadExtension(opts.base, "xevy-model.ts", PI_EXTENSION_DIR, [
253
- "xevyModelExtension",
254
- "registerCommand",
255
- ]);
256
- await downloadExtension(opts.base, "xevy-mcp.ts", PI_EXTENSION_DIR, [
257
- "xevyMcpExtension",
258
- "registerCommand",
259
- ]);
260
- await downloadExtension(opts.base, XEVY_EXTENSION_FILE, XEVY_EXTENSIONS_DIR, [
261
- "EXTENSION_VERSION",
262
- "registerCommand",
263
- ]);
286
+ // 2. Extensions (core + model + MCP globally, xevy.ts into ~/.xevy).
287
+ await downloadAllExtensions(opts.base);
264
288
 
265
289
  // 3. API key — reuse the saved one if present, otherwise ask for a new one.
266
290
  const existing = readStoredToken();
@@ -275,12 +299,55 @@ async function setup(opts) {
275
299
  writeCredentials(opts.base, token);
276
300
  console.log(`✓ API key stored at ${CREDENTIALS_FILE} (key not shown).`);
277
301
 
302
+ // 4. SDLC skills — install the Xevy agent skills so Claude Code / Cursor /
303
+ // Codex pick them up alongside pi.
304
+ const skillsOk = installSkills(opts.base);
305
+
278
306
  console.log("\n✓ Setup complete.");
279
307
  console.log(" • Xevy models (xevy/auto, xevy/fast, …) + MCP tools are available in any pi session — no /login needed.");
308
+ console.log(
309
+ skillsOk
310
+ ? " • Xevy SDLC skills installed for Claude Code / Cursor / Codex — refresh later with `xevy update`."
311
+ : " • Xevy SDLC skills NOT installed — run `xevy update` to add them.",
312
+ );
280
313
  console.log(" • Run `xevy` to open pi with the Xevy tools + models loaded.");
314
+ console.log(" • Keep current with `xevy check` / `xevy update`.");
281
315
  if (opts.base !== DEFAULT_BASE) console.log(` • Host: ${opts.base}`);
282
316
  }
283
317
 
318
+ // `xevy update` — refresh the pi extensions from the server AND update the SDLC
319
+ // skills. This is the "update everything the CLI installed" command. Skills are
320
+ // delegated to @xevy/skills (the source of truth); the API key is left as-is.
321
+ async function update(opts) {
322
+ console.log("Updating Xevy\n");
323
+
324
+ // 1. Re-download the pi extensions (they carry the date-stamped versions).
325
+ await downloadAllExtensions(opts.base);
326
+
327
+ // 2. Skills via @xevy/skills (single source of truth for SDLC skills).
328
+ const skillsOk = installSkills(opts.base);
329
+
330
+ console.log("\n✓ Update complete.");
331
+ console.log(" • Xevy pi extensions refreshed.");
332
+ console.log(
333
+ skillsOk
334
+ ? " • Xevy SDLC skills updated."
335
+ : " • Xevy SDLC skills NOT updated — run `npx @xevy/skills update -y` manually.",
336
+ );
337
+ if (opts.base !== DEFAULT_BASE) console.log(` • Host: ${opts.base}`);
338
+ }
339
+
340
+ // `xevy check` — is a newer SDLC-skills version available? Delegates to the
341
+ // @xevy/skills version check (which reads the install stamp + npm/manifest).
342
+ function check(opts) {
343
+ const args = ["--yes", "@xevy/skills", "check"];
344
+ if (opts.base !== DEFAULT_BASE) args.push("--base", opts.base);
345
+ const command = isWindows ? "npx.cmd" : "npx";
346
+ const r = spawnSync(command, args, { stdio: "inherit", shell: isWindows, env: process.env });
347
+ // Preserve @xevy/skills' exit code (0 = current, 2 = update available, …).
348
+ process.exit(r.status ?? (r.error ? 1 : 0));
349
+ }
350
+
284
351
  function open(opts) {
285
352
  if (!hasPi()) {
286
353
  die("pi is not installed. Run `xevy setup` first.");
@@ -311,6 +378,8 @@ async function main() {
311
378
  if (opts.command === "help") return usage();
312
379
  if (opts.command === "version") return console.log(readCliVersion());
313
380
  if (opts.command === "setup") return setup(opts);
381
+ if (opts.command === "update") return update(opts);
382
+ if (opts.command === "check") return check(opts);
314
383
  if (opts.command === "open") return open(opts);
315
384
  }
316
385
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@xevy/cli",
3
- "version": "0.1.6",
4
- "description": "Xevy CLI — `xevy setup` installs the pi agent + the Xevy pi extension and stores your API key; `xevy` opens pi with it.",
3
+ "version": "0.1.8",
4
+ "description": "Xevy CLI — `xevy setup` installs the pi agent, the Xevy pi extensions, and the SDLC skills, and stores your API key; `xevy update`/`xevy check` keep them current; `xevy` opens pi with it.",
5
5
  "type": "module",
6
6
  "keywords": [
7
7
  "xevy",