@otonix/cli 1.5.0 → 1.7.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.
Files changed (2) hide show
  1. package/dist/cli.js +224 -76
  2. 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.5.0";
31
+ var VERSION = "1.7.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() {
@@ -87,71 +87,139 @@ function formatTime(dateStr) {
87
87
  if (ago < 86400) return `${Math.floor(ago / 3600)}h ago`;
88
88
  return `${Math.floor(ago / 86400)}d ago`;
89
89
  }
90
- var HELP = `
91
- otonix \u2014 CLI for the Otonix sovereign compute platform
92
-
93
- Usage:
94
- otonix <command> [options]
95
-
96
- Commands:
97
- init Configure API key and endpoint
98
- keygen <name> Generate a new API key
99
- register Register an agent on this VPS
100
- heartbeat Send a heartbeat ping
101
- heartbeat:loop Start continuous heartbeat loop
102
- status Show agent status
103
- agents List all connected agents
104
- actions [--limit N] Show agent action log
105
- log <message> Log an agent action
106
- domains List registered domains
107
- sandboxes List VPS sandboxes
108
- engine Show autonomic engine status
109
- credits <agentId> Show agent credit balance
110
- credits:transfer Transfer credits between agents
111
- credits:history <id> Show credit transaction history
112
- templates List available agent templates
113
- templates:info <s> Show template details by slug
114
- templates:deploy Deploy an agent from a template
115
- marketplace List marketplace services
116
- x402 Show x402 payment config
117
- bv7x:promote <id> Promote an agent to mothership
118
- bv7x:spawn Spawn a satellite from a BV-7X template
119
- bv7x:satellites <id> List satellites of a mothership
120
- bv7x:destroy <id> Destroy (terminate) a satellite
121
- bv7x:report <id> Send a satellite data report
122
- bv7x:fleet Show full BV-7X fleet overview
123
- webhook:create Create a new webhook endpoint
124
- webhook:list List registered webhooks
125
- webhook:delete <id> Delete a webhook
126
- webhook:test <id> Send a test delivery to a webhook
127
- webhook:deliveries Show webhook delivery history
128
- webhook:events List all available webhook events
129
- trade:list List all service listings on marketplace
130
- trade:create Create a service listing for an agent
131
- trade:buy Buy a service from another agent
132
- trade:orders Show trading order history
133
- activity [--limit N] Show live activity feed
134
- llm:init <key> Configure Bankr LLM Gateway API key
135
- llm:models List available LLM models
136
- llm:chat <prompt> Send a chat completion request
137
- llm:usage [--days N] Show LLM usage summary
138
- llm:health Check gateway health
139
- whoami Show current configuration
140
- version Show CLI version
141
- help Show this help
142
-
143
- Examples:
144
- otonix init
145
- otonix keygen my-vps-key
146
- otonix register --name my-agent --model claude-opus-4-6
147
- otonix heartbeat:loop
148
- otonix log "Trade executed BTC/USDC" --category trading
149
- otonix actions --limit 20
150
- otonix llm:init bk_YOUR_API_KEY
151
- otonix llm:chat "Explain smart contracts" --model claude-haiku-4.5
90
+ var C = {
91
+ reset: "\x1B[0m",
92
+ bold: "\x1B[1m",
93
+ dim: "\x1B[2m",
94
+ cyan: "\x1B[36m",
95
+ green: "\x1B[32m",
96
+ yellow: "\x1B[33m",
97
+ blue: "\x1B[34m",
98
+ magenta: "\x1B[35m",
99
+ white: "\x1B[37m",
100
+ gray: "\x1B[90m",
101
+ bgCyan: "\x1B[46m",
102
+ bgBlue: "\x1B[44m"
103
+ };
104
+ var BANNER = `
105
+ ${C.cyan}${C.bold} \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557
106
+ \u2551 \u2551
107
+ \u2551 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2557\u2588\u2588\u2557 \u2588\u2588\u2557 \u2551
108
+ \u2551 \u2588\u2588\u2554\u2550\u2550\u2550\u2588\u2588\u2557\u255A\u2550\u2550\u2588\u2588\u2554\u2550\u2550\u255D\u2588\u2588\u2554\u2550\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551\u2588\u2588\u2551\u255A\u2588\u2588\u2557\u2588\u2588\u2554\u255D \u2551
109
+ \u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2554\u2588\u2588\u2557 \u2588\u2588\u2551\u2588\u2588\u2551 \u255A\u2588\u2588\u2588\u2554\u255D \u2551
110
+ \u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551\u255A\u2588\u2588\u2557\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2554\u2588\u2588\u2557 \u2551
111
+ \u2551 \u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D \u2588\u2588\u2551 \u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2551 \u255A\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2551\u2588\u2588\u2554\u255D \u2588\u2588\u2557 \u2551
112
+ \u2551 \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u2550\u2550\u255D\u255A\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D \u2551
113
+ \u2551 \u2551
114
+ \u2551${C.reset}${C.dim} Sovereign Compute Platform for Autonomous AI Agents ${C.cyan}${C.bold} \u2551
115
+ \u2551${C.reset}${C.gray} v${VERSION} \u2022 Web4 \u2022 x402 \u2022 Base Chain ${C.cyan}${C.bold} \u2551
116
+ \u2551 \u2551
117
+ \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D${C.reset}
152
118
  `;
119
+ function showDashboard() {
120
+ console.log(BANNER);
121
+ const config = loadConfig();
122
+ const connected = !!config;
123
+ const statusIcon = connected ? `${C.green}\u25CF${C.reset}` : `${C.yellow}\u25CB${C.reset}`;
124
+ const statusText = connected ? `${C.green}Connected${C.reset}` : `${C.yellow}Not configured${C.reset}`;
125
+ console.log(` ${C.dim}\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510${C.reset}`);
126
+ console.log(` ${C.dim}\u2502${C.reset} ${statusIcon} Status: ${statusText}${connected ? ` ${C.dim}\u2022${C.reset} ${C.gray}${config.endpoint}${C.reset}` : ` ${C.dim}\u2022${C.reset} ${C.gray}Run: otonix init${C.reset}`}`);
127
+ if (connected && config.agentName) {
128
+ console.log(` ${C.dim}\u2502${C.reset} Agent: ${C.bold}${config.agentName}${C.reset} ${C.dim}(${config.agentId?.slice(0, 8)}...)${C.reset}`);
129
+ }
130
+ console.log(` ${C.dim}\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518${C.reset}`);
131
+ console.log();
132
+ const section = (title, icon) => ` ${C.bold}${icon} ${title}${C.reset}`;
133
+ const cmd = (name, desc) => ` ${C.dim}\u2502${C.reset} ${C.cyan}${name.padEnd(24)}${C.reset}${C.gray}${desc}${C.reset}`;
134
+ const sep = () => ` ${C.dim}\u2502${C.reset}`;
135
+ console.log(section("SETUP", "\u26A1"));
136
+ console.log(cmd("init", "Configure API key and endpoint"));
137
+ console.log(cmd("keygen <name>", "Generate a new API key"));
138
+ console.log(cmd("whoami", "Show current configuration"));
139
+ console.log();
140
+ console.log(section("AGENT MANAGEMENT", "\u{1F916}"));
141
+ console.log(cmd("register", "Register an agent on this VPS"));
142
+ console.log(cmd("status", "Show agent status"));
143
+ console.log(cmd("agents", "List all connected agents"));
144
+ console.log(cmd("heartbeat", "Send a heartbeat ping"));
145
+ console.log(cmd("heartbeat:loop", "Start continuous heartbeat loop"));
146
+ console.log(cmd("actions [--limit N]", "Show agent action log"));
147
+ console.log(cmd("log <message>", "Log an agent action"));
148
+ console.log();
149
+ console.log(section("INFRASTRUCTURE", "\u2601\uFE0F"));
150
+ console.log(cmd("sandboxes", "List VPS sandboxes"));
151
+ console.log(cmd("domains", "List registered domains"));
152
+ console.log(cmd("engine", "Show autonomic engine status"));
153
+ console.log();
154
+ console.log(section("CREDITS & PAYMENTS", "\u{1F4B0}"));
155
+ console.log(cmd("credits <agentId>", "Show agent credit balance"));
156
+ console.log(cmd("credits:transfer", "Transfer credits between agents"));
157
+ console.log(cmd("credits:history <id>", "Show credit transaction history"));
158
+ console.log(cmd("x402", "Show x402 payment config"));
159
+ console.log();
160
+ console.log(section("TRADING MARKETPLACE", "\u{1F3EA}"));
161
+ console.log(cmd("trade:list", "List all service listings"));
162
+ console.log(cmd("trade:create", "Create a service listing"));
163
+ console.log(cmd("trade:buy", "Buy a service from another agent"));
164
+ console.log(cmd("trade:orders", "Show trading order history"));
165
+ console.log(cmd("trade:rate <id> <1-5>", "Rate a completed trading order"));
166
+ console.log(cmd("marketplace", "List static marketplace services"));
167
+ console.log();
168
+ console.log(section("LEADERBOARD", "\u{1F3C6}"));
169
+ console.log(cmd("leaderboard", "Show agent leaderboard (all categories)"));
170
+ console.log(cmd("leaderboard --sort revenue", "Sort by revenue earned"));
171
+ console.log(cmd("leaderboard --sort trades", "Sort by trade count"));
172
+ console.log(cmd("leaderboard --sort rating", "Sort by average rating"));
173
+ console.log();
174
+ console.log(section("BV-7X FLEET", "\u{1F6F0}\uFE0F"));
175
+ console.log(cmd("bv7x:fleet", "Show full fleet overview"));
176
+ console.log(cmd("bv7x:promote <id>", "Promote agent to mothership"));
177
+ console.log(cmd("bv7x:spawn", "Spawn a satellite agent"));
178
+ console.log(cmd("bv7x:satellites <id>", "List mothership's satellites"));
179
+ console.log(cmd("bv7x:destroy <id>", "Destroy a satellite"));
180
+ console.log(cmd("bv7x:report <id>", "Send satellite data report"));
181
+ console.log();
182
+ console.log(section("TEMPLATES", "\u{1F4E6}"));
183
+ console.log(cmd("templates", "List available agent templates"));
184
+ console.log(cmd("templates:info <slug>", "Show template details"));
185
+ console.log(cmd("templates:deploy", "Deploy agent from a template"));
186
+ console.log();
187
+ console.log(section("WEBHOOKS", "\u{1F514}"));
188
+ console.log(cmd("webhook:create", "Create a new webhook"));
189
+ console.log(cmd("webhook:list", "List registered webhooks"));
190
+ console.log(cmd("webhook:delete <id>", "Delete a webhook"));
191
+ console.log(cmd("webhook:test <id>", "Send a test delivery"));
192
+ console.log(cmd("webhook:deliveries", "Show delivery history"));
193
+ console.log(cmd("webhook:events", "List available event types"));
194
+ console.log();
195
+ console.log(section("AI INFERENCE (Bankr LLM)", "\u{1F9E0}"));
196
+ console.log(cmd("llm:init <key>", "Configure Bankr API key"));
197
+ console.log(cmd("llm:models", "List available LLM models"));
198
+ console.log(cmd("llm:chat <prompt>", "Send a chat completion"));
199
+ console.log(cmd("llm:usage [--days N]", "Show LLM usage summary"));
200
+ console.log(cmd("llm:health", "Check gateway health"));
201
+ console.log();
202
+ console.log(section("ACTIVITY", "\u{1F4E1}"));
203
+ console.log(cmd("activity [--limit N]", "Show live activity feed"));
204
+ console.log();
205
+ console.log(` ${C.dim}\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500${C.reset}`);
206
+ console.log(` ${C.gray}Examples:${C.reset}`);
207
+ console.log(` ${C.dim}$${C.reset} ${C.white}otonix init${C.reset}`);
208
+ console.log(` ${C.dim}$${C.reset} ${C.white}otonix register --name my-agent --model claude-opus-4-6${C.reset}`);
209
+ console.log(` ${C.dim}$${C.reset} ${C.white}otonix heartbeat:loop${C.reset}`);
210
+ console.log(` ${C.dim}$${C.reset} ${C.white}otonix trade:list${C.reset}`);
211
+ console.log(` ${C.dim}$${C.reset} ${C.white}otonix llm:chat "Explain smart contracts"${C.reset}`);
212
+ console.log();
213
+ console.log(` ${C.dim}Docs: ${C.cyan}https://app.otonix.tech/docs${C.reset} ${C.dim}\u2022${C.reset} ${C.dim}npm: ${C.cyan}@otonix/cli@${VERSION}${C.reset}`);
214
+ console.log();
215
+ }
216
+ function showBanner() {
217
+ console.log(BANNER);
218
+ }
153
219
  async function cmdInit() {
154
- console.log("\n Otonix CLI Setup\n");
220
+ showBanner();
221
+ console.log(` ${C.bold}\u26A1 CLI Setup${C.reset}
222
+ `);
155
223
  const endpoint = await prompt(" Endpoint [https://app.otonix.tech]: ") || "https://app.otonix.tech";
156
224
  const apiKey = await prompt(" API Key (otonix_xxx): ");
157
225
  if (!apiKey.startsWith("otonix_")) {
@@ -1205,20 +1273,90 @@ async function cmdActivity(args) {
1205
1273
  }
1206
1274
  console.log();
1207
1275
  }
1276
+ async function cmdTradeRate(args) {
1277
+ const client = getClient();
1278
+ const orderId = args[0];
1279
+ const score = parseInt(args[1]);
1280
+ if (!orderId) {
1281
+ console.error(" Usage: otonix trade:rate <orderId> <1-5> [--comment 'text']");
1282
+ process.exit(1);
1283
+ }
1284
+ if (!score || score < 1 || score > 5) {
1285
+ console.error(" Rating score must be between 1 and 5.");
1286
+ process.exit(1);
1287
+ }
1288
+ let comment = "";
1289
+ for (let i = 2; i < args.length; i++) {
1290
+ if (args[i] === "--comment" && args[i + 1]) comment = args[++i];
1291
+ }
1292
+ const result = await client.rateOrder(orderId, {
1293
+ ratingScore: score,
1294
+ ratingComment: comment || void 0
1295
+ });
1296
+ const stars = "\u2605".repeat(score) + "\u2606".repeat(5 - score);
1297
+ console.log(`
1298
+ ${C.green}\u2713 Rating submitted${C.reset}`);
1299
+ console.log(` Score: ${C.yellow}${stars}${C.reset} (${score}/5)`);
1300
+ console.log(` New rating: ${C.bold}${result.newRating.toFixed(1)}/5${C.reset}`);
1301
+ if (comment) console.log(` Comment: ${C.gray}${comment}${C.reset}`);
1302
+ console.log();
1303
+ }
1304
+ async function cmdLeaderboard(args) {
1305
+ const client = getClient();
1306
+ let sortBy = "revenue";
1307
+ for (let i = 0; i < args.length; i++) {
1308
+ if (args[i] === "--sort" && args[i + 1]) sortBy = args[++i];
1309
+ }
1310
+ const leaderboard = await client.getLeaderboard();
1311
+ if (!leaderboard.length) {
1312
+ console.log("\n No agents on the leaderboard yet.\n");
1313
+ return;
1314
+ }
1315
+ const sorted = [...leaderboard].sort((a, b) => {
1316
+ if (sortBy === "trades") return b.tradeCount - a.tradeCount;
1317
+ if (sortBy === "rating") return (b.avgRating ?? -1) - (a.avgRating ?? -1);
1318
+ if (sortBy === "actions") return b.totalActions - a.totalActions;
1319
+ if (sortBy === "fleet") return b.childrenCount - a.childrenCount;
1320
+ return b.revenue - a.revenue;
1321
+ });
1322
+ const medals = ["\u{1F947}", "\u{1F948}", "\u{1F949}"];
1323
+ const sortLabel = { revenue: "Revenue", trades: "Trades", rating: "Rating", actions: "Actions", fleet: "Fleet" }[sortBy] || "Revenue";
1324
+ console.log(`
1325
+ ${C.bold}\u{1F3C6} Agent Leaderboard \u2014 Top by ${sortLabel}${C.reset}
1326
+ `);
1327
+ console.log(` ${"#".padEnd(4)} ${"Agent".padEnd(22)} ${"Tier".padEnd(10)} ${"Revenue".padEnd(10)} ${"Trades".padEnd(8)} ${"Rating".padEnd(8)} Online`);
1328
+ console.log(` ${"\u2500".repeat(70)}`);
1329
+ sorted.slice(0, 10).forEach((a, i) => {
1330
+ const rank = medals[i] || ` ${String(i + 1).padStart(2)}.`;
1331
+ const name = a.name.slice(0, 20).padEnd(22);
1332
+ const tier = a.survivalTier.padEnd(10);
1333
+ const rev = `$${a.revenue.toFixed(1)}`.padEnd(10);
1334
+ const trades = String(a.tradeCount).padEnd(8);
1335
+ const rating = a.avgRating !== null ? `${a.avgRating.toFixed(1)}\u2605`.padEnd(8) : `\u2014`.padEnd(8);
1336
+ const online = a.isOnline ? `${C.green}\u25CF${C.reset}` : `${C.dim}\u25CB${C.reset}`;
1337
+ console.log(` ${rank} ${name} ${tier} ${rev} ${trades} ${rating} ${online}`);
1338
+ });
1339
+ console.log(`
1340
+ Sort: ${C.dim}--sort revenue | trades | rating | actions | fleet${C.reset}`);
1341
+ console.log();
1342
+ }
1208
1343
  function cmdWhoami() {
1209
1344
  const config = loadConfig();
1210
1345
  if (!config) {
1211
1346
  console.log(" Not configured. Run 'otonix init' first.");
1212
1347
  return;
1213
1348
  }
1214
- console.log(`
1215
- Current Config:`);
1216
- console.log(` Endpoint: ${config.endpoint}`);
1217
- console.log(` API Key: ${config.apiKey.slice(0, 12)}...${config.apiKey.slice(-4)}`);
1218
- console.log(` Agent ID: ${config.agentId || "not registered"}`);
1219
- console.log(` Agent: ${config.agentName || "\u2014"}`);
1220
- console.log(` Bankr LLM: ${config.bankrApiKey ? config.bankrApiKey.slice(0, 6) + "..." + config.bankrApiKey.slice(-4) : "not configured"}`);
1221
- console.log(` Config: ${CONFIG_FILE}
1349
+ showBanner();
1350
+ console.log(` ${C.bold}\u{1F511} Current Configuration${C.reset}
1351
+ `);
1352
+ console.log(` ${C.dim}\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510${C.reset}`);
1353
+ console.log(` ${C.dim}\u2502${C.reset} Endpoint ${C.cyan}${config.endpoint}${C.reset}`);
1354
+ console.log(` ${C.dim}\u2502${C.reset} API Key ${C.gray}${config.apiKey.slice(0, 12)}...${config.apiKey.slice(-4)}${C.reset}`);
1355
+ console.log(` ${C.dim}\u2502${C.reset} Agent ID ${config.agentId ? `${C.green}${config.agentId.slice(0, 12)}...${C.reset}` : `${C.yellow}not registered${C.reset}`}`);
1356
+ console.log(` ${C.dim}\u2502${C.reset} Agent ${config.agentName ? `${C.bold}${config.agentName}${C.reset}` : `${C.gray}\u2014${C.reset}`}`);
1357
+ console.log(` ${C.dim}\u2502${C.reset} Bankr LLM ${config.bankrApiKey ? `${C.green}${config.bankrApiKey.slice(0, 6)}...${config.bankrApiKey.slice(-4)}${C.reset}` : `${C.gray}not configured${C.reset}`}`);
1358
+ console.log(` ${C.dim}\u2502${C.reset} Config ${C.gray}${CONFIG_FILE}${C.reset}`);
1359
+ console.log(` ${C.dim}\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518${C.reset}
1222
1360
  `);
1223
1361
  }
1224
1362
  async function main() {
@@ -1335,6 +1473,12 @@ async function main() {
1335
1473
  case "trade:orders":
1336
1474
  await cmdTradeOrders(rest);
1337
1475
  break;
1476
+ case "trade:rate":
1477
+ await cmdTradeRate(rest);
1478
+ break;
1479
+ case "leaderboard":
1480
+ await cmdLeaderboard(rest);
1481
+ break;
1338
1482
  case "activity":
1339
1483
  await cmdActivity(rest);
1340
1484
  break;
@@ -1359,16 +1503,20 @@ async function main() {
1359
1503
  case "version":
1360
1504
  case "-v":
1361
1505
  case "--version":
1362
- console.log(` otonix v${VERSION}`);
1506
+ showBanner();
1507
+ console.log(` ${C.green}${C.bold}v${VERSION}${C.reset} ${C.dim}@otonix/cli${C.reset}`);
1508
+ console.log();
1363
1509
  break;
1364
1510
  case "help":
1365
1511
  case "-h":
1366
1512
  case "--help":
1367
- console.log(HELP);
1513
+ showDashboard();
1368
1514
  break;
1369
1515
  default:
1370
- console.error(` Unknown command: ${command}`);
1371
- console.log(HELP);
1516
+ console.error(`
1517
+ ${C.yellow}Unknown command: ${command}${C.reset}
1518
+ `);
1519
+ showDashboard();
1372
1520
  process.exit(1);
1373
1521
  }
1374
1522
  } catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@otonix/cli",
3
- "version": "1.5.0",
3
+ "version": "1.7.0",
4
4
  "description": "CLI tool for the Otonix sovereign compute platform — initialize agents, generate API keys, register, monitor status, BV-7X fleet orchestration, webhook management, 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.5.0"
41
+ "@otonix/sdk": "^1.6.0"
42
42
  },
43
43
  "devDependencies": {
44
44
  "tsup": "^8.0.0",