@xevy/cli 0.1.0 → 0.1.1
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/bin/xevy.mjs +21 -12
- package/package.json +1 -1
package/bin/xevy.mjs
CHANGED
|
@@ -36,7 +36,12 @@ const isWindows = process.platform === "win32";
|
|
|
36
36
|
|
|
37
37
|
const PI_PACKAGE = "@mariozechner/pi-coding-agent";
|
|
38
38
|
const PI_EXTENSION_DIR = path.join(os.homedir(), ".pi", "agent", "extensions");
|
|
39
|
-
|
|
39
|
+
// pi extensions installed by `xevy pi` — file name + a marker string used to
|
|
40
|
+
// sanity-check the download isn't SPA HTML (wrong --base).
|
|
41
|
+
const PI_EXTENSIONS = [
|
|
42
|
+
{ file: "xevy-model.ts", marker: "xevyModelExtension" },
|
|
43
|
+
{ file: "xevy-mcp.ts", marker: "xevyMcpExtension" },
|
|
44
|
+
];
|
|
40
45
|
|
|
41
46
|
function readCliVersion() {
|
|
42
47
|
try {
|
|
@@ -206,9 +211,9 @@ function ensurePi() {
|
|
|
206
211
|
}
|
|
207
212
|
}
|
|
208
213
|
|
|
209
|
-
async function
|
|
210
|
-
const url = `${opts.base}/${
|
|
211
|
-
console.log(`→ Downloading
|
|
214
|
+
async function installExtension(opts, { file, marker }) {
|
|
215
|
+
const url = `${opts.base}/${file}`;
|
|
216
|
+
console.log(`→ Downloading ${url}`);
|
|
212
217
|
|
|
213
218
|
let source;
|
|
214
219
|
try {
|
|
@@ -220,25 +225,29 @@ async function installModelExtension(opts) {
|
|
|
220
225
|
}
|
|
221
226
|
|
|
222
227
|
// Guard against a wrong --base returning the SPA HTML instead of the extension.
|
|
223
|
-
if (!source.includes(
|
|
224
|
-
die(`Downloaded ${url} does not look like the
|
|
228
|
+
if (!source.includes(marker) || !source.includes("registerCommand")) {
|
|
229
|
+
die(`Downloaded ${url} does not look like the ${file} extension (wrong --base?).`);
|
|
225
230
|
}
|
|
226
231
|
|
|
227
232
|
fs.mkdirSync(PI_EXTENSION_DIR, { recursive: true });
|
|
228
|
-
const dest = path.join(PI_EXTENSION_DIR,
|
|
233
|
+
const dest = path.join(PI_EXTENSION_DIR, file);
|
|
229
234
|
fs.writeFileSync(dest, source, "utf-8");
|
|
230
235
|
console.log(`✓ Installed ${dest}`);
|
|
231
236
|
}
|
|
232
237
|
|
|
233
238
|
async function piSetup(opts) {
|
|
234
|
-
console.log("Setting up the pi agent + Xevy model
|
|
239
|
+
console.log("Setting up the pi agent + Xevy extensions (model + MCP)\n");
|
|
235
240
|
|
|
236
241
|
ensurePi();
|
|
237
|
-
|
|
242
|
+
for (const ext of PI_EXTENSIONS) {
|
|
243
|
+
await installExtension(opts, ext);
|
|
244
|
+
}
|
|
238
245
|
|
|
239
|
-
console.log("\n✓ pi +
|
|
240
|
-
console.log(" •
|
|
241
|
-
console.log(" •
|
|
246
|
+
console.log("\n✓ pi + Xevy extensions ready.");
|
|
247
|
+
console.log(" • Sign in once: /login xevy — authenticates both the models and the MCP tools.");
|
|
248
|
+
console.log(" • Xevy models: xevy/auto, xevy/fast, xevy/advance, xevy/min, xevy/max, xevy/vision.");
|
|
249
|
+
console.log(" • MCP tools bridge automatically on session start (or run /xevy-mcp).");
|
|
250
|
+
console.log(" • If pi is already running, use /reload to load the extensions.");
|
|
242
251
|
if (opts.base !== DEFAULT_BASE) {
|
|
243
252
|
console.log(` • Source host: ${opts.base}`);
|
|
244
253
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xevy/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Xevy CLI — one command (`xevy setup`) installs the Xevy SDLC agent skills and the OAuth MCP server globally for Cursor, Claude Code, and 50+ agents. No API key required.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|