@agent-commons/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.
Files changed (2) hide show
  1. package/dist/bin.js +9 -4
  2. package/package.json +2 -2
package/dist/bin.js CHANGED
@@ -203,14 +203,19 @@ function loginCommand() {
203
203
  try {
204
204
  const current = loadConfig();
205
205
  const apiUrl = opts.apiUrl !== DEFAULT_API_URL ? opts.apiUrl : await prompt(`API URL [${current.apiUrl ?? DEFAULT_API_URL}]: `) || (current.apiUrl ?? DEFAULT_API_URL);
206
+ const appUrl = apiUrl.includes("localhost") ? "http://localhost:3000" : apiUrl.replace(/\/api$/, "").replace("api.", "").replace(":3001", ":3000");
206
207
  let apiKey = opts.apiKey;
207
208
  if (!apiKey) {
208
- apiKey = await prompt(`API Key [${current.apiKey ? "****" : "none"}]: `);
209
+ console.log(`
210
+ Generate an API key at:
211
+ ${c.bold(`${appUrl}/settings/api-keys`)}
212
+ `);
213
+ apiKey = await prompt(`API Key (sk-ac-...): `);
209
214
  if (!apiKey) apiKey = current.apiKey;
210
215
  }
211
216
  let initiator = opts.initiator;
212
217
  if (!initiator) {
213
- initiator = await prompt(`Initiator ID [${current.initiator ?? "none"}]: `);
218
+ initiator = await prompt(`Wallet address (0x...): `);
214
219
  if (!initiator) initiator = current.initiator;
215
220
  }
216
221
  saveConfig({ apiUrl, apiKey, initiator });
@@ -1800,7 +1805,7 @@ function walletCommand() {
1800
1805
  Address: w.address,
1801
1806
  Chain: chainName(w.chainId),
1802
1807
  Label: w.label ?? "Primary",
1803
- Active: w.isActive ? sym.pass : sym.fail
1808
+ Active: w.isActive ? sym.ok : sym.fail
1804
1809
  })),
1805
1810
  ["ID", "Type", "Address", "Chain", "Label", "Active"]
1806
1811
  );
@@ -1908,7 +1913,7 @@ function walletCommand() {
1908
1913
  const w = wallet?.data ?? wallet;
1909
1914
  if (opts.json) return jsonOut(w);
1910
1915
  console.log(`
1911
- ${sym.pass} ${c.bold("Wallet created")}`);
1916
+ ${sym.ok} ${c.bold("Wallet created")}`);
1912
1917
  detail([
1913
1918
  ["Address", c.bold(w.address)],
1914
1919
  ["Type", w.walletType],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-commons/cli",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Agent Commons CLI — chat, run, and manage agents from your terminal",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -14,7 +14,7 @@
14
14
  "commander": "^12.1.0",
15
15
  "chalk": "^5.3.0",
16
16
  "ora": "^8.1.1",
17
- "@agent-commons/sdk": "0.1.3"
17
+ "@agent-commons/sdk": "0.1.4"
18
18
  },
19
19
  "devDependencies": {
20
20
  "tsup": "^8.3.5",