@otonix/cli 1.0.0 → 1.1.0
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/dist/cli.js +31 -1
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -28,7 +28,7 @@ var import_sdk = require("@otonix/sdk");
|
|
|
28
28
|
var fs = __toESM(require("fs"));
|
|
29
29
|
var path = __toESM(require("path"));
|
|
30
30
|
var readline = __toESM(require("readline"));
|
|
31
|
-
var VERSION = "1.
|
|
31
|
+
var VERSION = "1.1.0";
|
|
32
32
|
var CONFIG_DIR = path.join(process.env.HOME || "~", ".otonix");
|
|
33
33
|
var CONFIG_FILE = path.join(CONFIG_DIR, "config.json");
|
|
34
34
|
function loadConfig() {
|
|
@@ -106,6 +106,7 @@ var HELP = `
|
|
|
106
106
|
domains List registered domains
|
|
107
107
|
sandboxes List VPS sandboxes
|
|
108
108
|
engine Show autonomic engine status
|
|
109
|
+
marketplace List marketplace services
|
|
109
110
|
x402 Show x402 payment config
|
|
110
111
|
whoami Show current configuration
|
|
111
112
|
version Show CLI version
|
|
@@ -437,6 +438,32 @@ async function cmdEngine() {
|
|
|
437
438
|
}
|
|
438
439
|
console.log();
|
|
439
440
|
}
|
|
441
|
+
async function cmdMarketplace() {
|
|
442
|
+
const client = getClient();
|
|
443
|
+
const services = await client.listMarketplaceServices();
|
|
444
|
+
if (!services.length) {
|
|
445
|
+
console.log("\n No marketplace services available.\n");
|
|
446
|
+
return;
|
|
447
|
+
}
|
|
448
|
+
console.log(`
|
|
449
|
+
Agent Marketplace \u2014 ${services.length} services
|
|
450
|
+
`);
|
|
451
|
+
printTable(
|
|
452
|
+
services.map((s) => ({
|
|
453
|
+
ID: s.id,
|
|
454
|
+
Name: s.name,
|
|
455
|
+
Category: s.category,
|
|
456
|
+
Price: `${s.priceOtx} $OTX/${s.priceUnit}`,
|
|
457
|
+
Uptime: `${s.uptime}%`,
|
|
458
|
+
Rating: `${s.rating}/5`,
|
|
459
|
+
Jobs: s.jobsCompleted,
|
|
460
|
+
Status: s.status
|
|
461
|
+
}))
|
|
462
|
+
);
|
|
463
|
+
console.log(`
|
|
464
|
+
Use 'curl https://app.otonix.tech/api/marketplace/services/<id>' for details.
|
|
465
|
+
`);
|
|
466
|
+
}
|
|
440
467
|
async function cmdX402() {
|
|
441
468
|
const client = getClient();
|
|
442
469
|
const config = await client.getX402Config();
|
|
@@ -506,6 +533,9 @@ async function main() {
|
|
|
506
533
|
case "engine":
|
|
507
534
|
await cmdEngine();
|
|
508
535
|
break;
|
|
536
|
+
case "marketplace":
|
|
537
|
+
await cmdMarketplace();
|
|
538
|
+
break;
|
|
509
539
|
case "x402":
|
|
510
540
|
await cmdX402();
|
|
511
541
|
break;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@otonix/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "CLI tool for the Otonix sovereign compute platform — initialize agents, generate API keys, register, monitor status, and manage infrastructure from the terminal.",
|
|
5
5
|
"main": "dist/cli.js",
|
|
6
6
|
"bin": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"node": ">=18"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@otonix/sdk": "^1.
|
|
41
|
+
"@otonix/sdk": "^1.1.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"tsup": "^8.0.0",
|