@xevy/cli 0.1.5 → 0.1.7
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 +84 -16
- package/bin/xevy.mjs +26 -38
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,18 +1,81 @@
|
|
|
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:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
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
|
|
4
39
|
|
|
5
40
|
```bash
|
|
6
|
-
|
|
7
|
-
|
|
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. Asks for your **API key**. When prompted, open the link it prints — it takes you
|
|
49
|
+
straight to **Settings → Profile → API keys** at
|
|
50
|
+
<https://xevy.ai/settings?section=profile&tab=api> — click **Create key**, copy the
|
|
51
|
+
key, and paste it back into the terminal. Your key is saved to
|
|
52
|
+
`~/.config/xevy/credentials` and never printed again.
|
|
53
|
+
|
|
54
|
+
### 5. Start working
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
xevy # open an interactive pi session with Xevy loaded
|
|
58
|
+
xevy "summarise this repo" # or send a one-off prompt
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
That's it — you're set up. The sections below are reference for when you need more detail.
|
|
62
|
+
|
|
63
|
+
## Upgrading
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
npm update -g @xevy/cli # or re-run: npm install -g @xevy/cli
|
|
8
67
|
```
|
|
9
68
|
|
|
10
69
|
## `xevy setup`
|
|
11
70
|
|
|
12
71
|
1. Installs the **pi agent** if it isn't already on your PATH.
|
|
13
|
-
2.
|
|
14
|
-
|
|
15
|
-
|
|
72
|
+
2. Installs the Xevy extensions:
|
|
73
|
+
- **`xevy-core.ts`** (shared UI + setup/context), **`xevy-model.ts`** (the
|
|
74
|
+
`xevy/*` models), and **`xevy-mcp.ts`** (the MCP→pi tool bridge) into pi's
|
|
75
|
+
**global** dir `~/.pi/agent/extensions/`, so they load in *every* pi session.
|
|
76
|
+
- **`xevy.ts`** (tools + workflow commands) into **`~/.xevy/extensions/`**.
|
|
77
|
+
3. Asks for your **API key** (reuses an already-saved one if present) and prints a
|
|
78
|
+
**direct link to the API-keys tab** to generate one, then stores it in
|
|
16
79
|
`~/.config/xevy/credentials` (mode `600`, never printed).
|
|
17
80
|
|
|
18
81
|
The API-keys link opens **Settings → Profile → API keys** directly:
|
|
@@ -20,21 +83,14 @@ The API-keys link opens **Settings → Profile → API keys** directly:
|
|
|
20
83
|
|
|
21
84
|
## `xevy`
|
|
22
85
|
|
|
23
|
-
Opens pi, loading
|
|
24
|
-
|
|
86
|
+
Opens pi, loading `~/.xevy/extensions` via `pi -e …` (pi also auto-loads the
|
|
87
|
+
global dir, so core + model + MCP come along). Extra arguments are forwarded to pi:
|
|
25
88
|
|
|
26
89
|
```bash
|
|
27
90
|
xevy # interactive pi session with Xevy
|
|
28
91
|
xevy "summarise this repo" # forwards the prompt to pi
|
|
29
92
|
```
|
|
30
93
|
|
|
31
|
-
## `xevy pi` (alternative)
|
|
32
|
-
|
|
33
|
-
Installs the split **model + MCP** extensions (`xevy-model.ts`, `xevy-mcp.ts`)
|
|
34
|
-
into pi's own extensions dir and authenticates over **OAuth** (`/login xevy`) —
|
|
35
|
-
no API key. Use this instead of `setup` if you prefer OAuth and the hosted
|
|
36
|
-
`xevy/*` models + MCP tool bridge.
|
|
37
|
-
|
|
38
94
|
## Options
|
|
39
95
|
|
|
40
96
|
```
|
|
@@ -43,8 +99,20 @@ no API key. Use this instead of `setup` if you prefer OAuth and the hosted
|
|
|
43
99
|
-h, --help Show help
|
|
44
100
|
```
|
|
45
101
|
|
|
102
|
+
## Skills & MCP for other agents
|
|
103
|
+
|
|
104
|
+
`@xevy/cli` sets up the [pi](https://github.com/badlogic/pi-mono) agent. If you'd
|
|
105
|
+
rather use **Cursor, Claude Code, or one of [50+ other agents](https://github.com/vercel-labs/skills#supported-agents)**,
|
|
106
|
+
install the Xevy **SDLC skills** and the **Xevy MCP server** with the sibling
|
|
107
|
+
package instead:
|
|
108
|
+
|
|
46
109
|
```bash
|
|
47
|
-
|
|
110
|
+
npx @xevy/skills # skills + MCP, global by default
|
|
111
|
+
npx @xevy/skills --project # into the current repo instead
|
|
48
112
|
```
|
|
49
113
|
|
|
114
|
+
Then connect MCP over OAuth (Cursor: Settings → MCP → `xevy`; Claude Code: browser
|
|
115
|
+
sign-in on first use). See the [`@xevy/skills` README](../xevy-skills/README.md) for
|
|
116
|
+
the full command list, per-agent flags, and manual install steps.
|
|
117
|
+
|
|
50
118
|
Docs: <https://xevy.ai/docs/mcp>
|
package/bin/xevy.mjs
CHANGED
|
@@ -2,15 +2,14 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* @xevy/cli — the `xevy` command.
|
|
4
4
|
*
|
|
5
|
-
* xevy setup Install the pi agent (if missing)
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* xevy pi
|
|
9
|
-
* extensions dir, authenticated via OAuth.
|
|
5
|
+
* xevy setup Install the pi agent (if missing); install the Xevy extensions
|
|
6
|
+
* (core + model + MCP globally, xevy.ts into ~/.xevy/extensions);
|
|
7
|
+
* and store your API key.
|
|
8
|
+
* xevy Open pi with the Xevy extensions.
|
|
10
9
|
*
|
|
11
|
-
* `xevy setup`
|
|
12
|
-
*
|
|
13
|
-
*
|
|
10
|
+
* `xevy setup` fetches the extensions from the server and asks for an API key
|
|
11
|
+
* (with a direct link to the exact page to generate one), stored in
|
|
12
|
+
* ~/.config/xevy/credentials. Then `xevy` launches pi with them.
|
|
14
13
|
*/
|
|
15
14
|
import { spawnSync } from "node:child_process";
|
|
16
15
|
import fs from "node:fs";
|
|
@@ -40,12 +39,9 @@ const CREDENTIALS_DIR = path.join(
|
|
|
40
39
|
);
|
|
41
40
|
const CREDENTIALS_FILE = path.join(CREDENTIALS_DIR, "credentials");
|
|
42
41
|
|
|
43
|
-
//
|
|
42
|
+
// pi's global extensions dir — core + model + MCP are installed here so they
|
|
43
|
+
// load in every pi session.
|
|
44
44
|
const PI_EXTENSION_DIR = path.join(os.homedir(), ".pi", "agent", "extensions");
|
|
45
|
-
const PI_EXTENSIONS = [
|
|
46
|
-
{ file: "xevy-model.ts", marker: "xevyModelExtension" },
|
|
47
|
-
{ file: "xevy-mcp.ts", marker: "xevyMcpExtension" },
|
|
48
|
-
];
|
|
49
45
|
|
|
50
46
|
function apiKeysUrl(base) {
|
|
51
47
|
// Direct link to the API keys tab (Profile → API keys), reachable without a
|
|
@@ -71,8 +67,7 @@ function usage() {
|
|
|
71
67
|
console.log(`Xevy CLI
|
|
72
68
|
|
|
73
69
|
xevy Open pi with the Xevy extensions in ~/.xevy/extensions
|
|
74
|
-
xevy setup [--base u] Install pi (if missing) + the Xevy
|
|
75
|
-
xevy pi [--base u] (alt) Install the split model + MCP extensions over OAuth
|
|
70
|
+
xevy setup [--base u] Install pi (if missing) + the Xevy extensions, store your API key
|
|
76
71
|
|
|
77
72
|
Options:
|
|
78
73
|
--base <url> Xevy host (default: XEVY_BASE or ${DEFAULT_BASE})
|
|
@@ -82,7 +77,11 @@ Options:
|
|
|
82
77
|
Examples:
|
|
83
78
|
npx @xevy/cli setup
|
|
84
79
|
npx @xevy/cli
|
|
85
|
-
|
|
80
|
+
|
|
81
|
+
Install globally to drop the npx prefix:
|
|
82
|
+
npm install -g @xevy/cli
|
|
83
|
+
xevy setup
|
|
84
|
+
xevy`);
|
|
86
85
|
}
|
|
87
86
|
|
|
88
87
|
function parseArgv(argv) {
|
|
@@ -95,9 +94,9 @@ function parseArgv(argv) {
|
|
|
95
94
|
if (first === "-h" || first === "--help" || first === "help") return { command: "help", base };
|
|
96
95
|
if (first === "-v" || first === "--version") return { command: "version", base };
|
|
97
96
|
|
|
98
|
-
if (first === "setup"
|
|
97
|
+
if (first === "setup") {
|
|
99
98
|
args.shift();
|
|
100
|
-
const opts = { command:
|
|
99
|
+
const opts = { command: "setup", base, piArgs: [] };
|
|
101
100
|
while (args.length > 0) {
|
|
102
101
|
const a = args.shift();
|
|
103
102
|
if (a === "--base") {
|
|
@@ -106,7 +105,7 @@ function parseArgv(argv) {
|
|
|
106
105
|
opts.base = v.replace(/\/$/, "");
|
|
107
106
|
continue;
|
|
108
107
|
}
|
|
109
|
-
die(`Unknown option for \`xevy
|
|
108
|
+
die(`Unknown option for \`xevy setup\`: ${a}. Try \`xevy --help\`.`);
|
|
110
109
|
}
|
|
111
110
|
return opts;
|
|
112
111
|
}
|
|
@@ -246,8 +245,10 @@ async function setup(opts) {
|
|
|
246
245
|
// double-load: if it were also in ~/.xevy it'd register ask_question twice.
|
|
247
246
|
// • xevy-model.ts → GLOBAL too, so the xevy/* models are available in every
|
|
248
247
|
// pi session (plain `pi` included), not just via `xevy`.
|
|
248
|
+
// • xevy-mcp.ts → GLOBAL too — the MCP→pi tool bridge (auth reused from
|
|
249
|
+
// the model login), available in every pi session.
|
|
249
250
|
// • xevy.ts → ~/.xevy/extensions (tools/workflow; loaded by `xevy`,
|
|
250
|
-
// which also auto-loads the global dir → core + model come along).
|
|
251
|
+
// which also auto-loads the global dir → core + model + MCP come along).
|
|
251
252
|
await downloadExtension(opts.base, "xevy-core.ts", PI_EXTENSION_DIR, [
|
|
252
253
|
"xevyCoreExtension",
|
|
253
254
|
"registerCommand",
|
|
@@ -256,6 +257,10 @@ async function setup(opts) {
|
|
|
256
257
|
"xevyModelExtension",
|
|
257
258
|
"registerCommand",
|
|
258
259
|
]);
|
|
260
|
+
await downloadExtension(opts.base, "xevy-mcp.ts", PI_EXTENSION_DIR, [
|
|
261
|
+
"xevyMcpExtension",
|
|
262
|
+
"registerCommand",
|
|
263
|
+
]);
|
|
259
264
|
await downloadExtension(opts.base, XEVY_EXTENSION_FILE, XEVY_EXTENSIONS_DIR, [
|
|
260
265
|
"EXTENSION_VERSION",
|
|
261
266
|
"registerCommand",
|
|
@@ -275,7 +280,7 @@ async function setup(opts) {
|
|
|
275
280
|
console.log(`✓ API key stored at ${CREDENTIALS_FILE} (key not shown).`);
|
|
276
281
|
|
|
277
282
|
console.log("\n✓ Setup complete.");
|
|
278
|
-
console.log(" • Xevy models (xevy/auto, xevy/fast, …) are available in any pi session — no /login needed.");
|
|
283
|
+
console.log(" • Xevy models (xevy/auto, xevy/fast, …) + MCP tools are available in any pi session — no /login needed.");
|
|
279
284
|
console.log(" • Run `xevy` to open pi with the Xevy tools + models loaded.");
|
|
280
285
|
if (opts.base !== DEFAULT_BASE) console.log(` • Host: ${opts.base}`);
|
|
281
286
|
}
|
|
@@ -304,29 +309,12 @@ function open(opts) {
|
|
|
304
309
|
process.exit(r.status ?? 0);
|
|
305
310
|
}
|
|
306
311
|
|
|
307
|
-
async function piSetup(opts) {
|
|
308
|
-
console.log("Setting up the pi agent + Xevy extensions (model + MCP)\n");
|
|
309
|
-
|
|
310
|
-
ensurePi();
|
|
311
|
-
for (const ext of PI_EXTENSIONS) {
|
|
312
|
-
await downloadExtension(opts.base, ext.file, PI_EXTENSION_DIR, [ext.marker, "registerCommand"]);
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
console.log("\n✓ pi + Xevy extensions ready.");
|
|
316
|
-
console.log(" • Sign in once: /login xevy — authenticates both the models and the MCP tools.");
|
|
317
|
-
console.log(" • Xevy models: xevy/auto, xevy/fast, xevy/advance, xevy/min, xevy/max, xevy/vision.");
|
|
318
|
-
console.log(" • MCP tools bridge automatically on session start (or run /xevy-mcp).");
|
|
319
|
-
console.log(" • If pi is already running, use /reload to load the extensions.");
|
|
320
|
-
if (opts.base !== DEFAULT_BASE) console.log(` • Source host: ${opts.base}`);
|
|
321
|
-
}
|
|
322
|
-
|
|
323
312
|
async function main() {
|
|
324
313
|
const opts = parseArgv(process.argv.slice(2));
|
|
325
314
|
|
|
326
315
|
if (opts.command === "help") return usage();
|
|
327
316
|
if (opts.command === "version") return console.log(readCliVersion());
|
|
328
317
|
if (opts.command === "setup") return setup(opts);
|
|
329
|
-
if (opts.command === "pi") return piSetup(opts);
|
|
330
318
|
if (opts.command === "open") return open(opts);
|
|
331
319
|
}
|
|
332
320
|
|
package/package.json
CHANGED