@agentis-hq/cli 0.1.3 → 0.1.4
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/index.js +25 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
|
|
3
|
+
// src/index.ts
|
|
4
|
+
import { readFileSync as readFileSync2 } from "fs";
|
|
5
|
+
import { dirname as dirname2, join as join3 } from "path";
|
|
6
|
+
import { fileURLToPath } from "url";
|
|
7
|
+
|
|
3
8
|
// src/lib/keychain.ts
|
|
4
9
|
import { Entry } from "@napi-rs/keyring";
|
|
5
10
|
var entry = new Entry("agentis-cli", "account-key");
|
|
@@ -1342,6 +1347,16 @@ var green = "\x1B[38;5;114m";
|
|
|
1342
1347
|
var muted = "\x1B[38;5;244m";
|
|
1343
1348
|
var bold = "\x1B[1m";
|
|
1344
1349
|
var reset = "\x1B[0m";
|
|
1350
|
+
function readCliVersion() {
|
|
1351
|
+
try {
|
|
1352
|
+
const packageJsonPath = join3(dirname2(fileURLToPath(import.meta.url)), "..", "package.json");
|
|
1353
|
+
const packageJson = JSON.parse(readFileSync2(packageJsonPath, "utf8"));
|
|
1354
|
+
return packageJson.version ?? "unknown";
|
|
1355
|
+
} catch {
|
|
1356
|
+
return "unknown";
|
|
1357
|
+
}
|
|
1358
|
+
}
|
|
1359
|
+
var version = readCliVersion();
|
|
1345
1360
|
var helpSpecs = {
|
|
1346
1361
|
login: {
|
|
1347
1362
|
usage: "agentis login",
|
|
@@ -1355,6 +1370,10 @@ var helpSpecs = {
|
|
|
1355
1370
|
usage: "agentis whoami",
|
|
1356
1371
|
description: "Show the currently authenticated Agentis account key in masked form."
|
|
1357
1372
|
},
|
|
1373
|
+
version: {
|
|
1374
|
+
usage: "agentis version",
|
|
1375
|
+
description: "Show the installed Agentis CLI version."
|
|
1376
|
+
},
|
|
1358
1377
|
wallet: {
|
|
1359
1378
|
usage: "agentis wallet <command>",
|
|
1360
1379
|
description: "Create and list hosted or local Solana wallets.",
|
|
@@ -1609,7 +1628,7 @@ function showHelp() {
|
|
|
1609
1628
|
\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u255D \u2588\u2588\u2551\u255A\u2588\u2588\u2557\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551\u255A\u2550\u2550\u2550\u2550\u2588\u2588\u2551
|
|
1610
1629
|
\u2588\u2588\u2551 \u2588\u2588\u2551\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2551 \u255A\u2588\u2588\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551
|
|
1611
1630
|
\u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u2550\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D
|
|
1612
|
-
${reset}${muted}
|
|
1631
|
+
${reset}${muted}v${version}${reset}
|
|
1613
1632
|
|
|
1614
1633
|
${bold}Agentis${reset} \u2014 financial infrastructure for AI agents
|
|
1615
1634
|
|
|
@@ -1617,6 +1636,7 @@ ${green}${bold}Commands:${reset}
|
|
|
1617
1636
|
login authenticate with your Agentis account
|
|
1618
1637
|
logout remove stored credentials
|
|
1619
1638
|
whoami show current account
|
|
1639
|
+
version show installed CLI version
|
|
1620
1640
|
|
|
1621
1641
|
wallet create --name <name> create hosted wallet (requires login)
|
|
1622
1642
|
wallet create --name <name> --local create local encrypted wallet
|
|
@@ -1706,6 +1726,10 @@ function showCommandHelp(path) {
|
|
|
1706
1726
|
console.log();
|
|
1707
1727
|
}
|
|
1708
1728
|
async function main() {
|
|
1729
|
+
if (cmd === "--version" || cmd === "-v" || cmd === "version") {
|
|
1730
|
+
console.log(version);
|
|
1731
|
+
return;
|
|
1732
|
+
}
|
|
1709
1733
|
if (!cmd || hasHelpFlag(args)) {
|
|
1710
1734
|
showCommandHelp(helpPath(args));
|
|
1711
1735
|
return;
|