@clawcard/cli 2.0.1 → 2.0.3

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/package.json +1 -1
  2. package/src/index.js +16 -11
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clawcard/cli",
3
- "version": "2.0.1",
3
+ "version": "2.0.3",
4
4
  "description": "The ClawCard CLI — manage your agent keys, billing, and setup from the terminal",
5
5
  "bin": {
6
6
  "clawcard": "./bin/clawcard.mjs"
package/src/index.js CHANGED
@@ -314,6 +314,7 @@ program
314
314
  .command("update")
315
315
  .description("Update to the latest version")
316
316
  .action(async () => {
317
+ const { checkForUpdate } = await import("./splash.js");
317
318
  const s = p.spinner();
318
319
  s.start("Checking for updates...");
319
320
  const latest = await checkForUpdate();
@@ -369,7 +370,13 @@ if (process.argv.length <= 2) {
369
370
 
370
371
  if (!hasBalance) {
371
372
  p.log.warn(
372
- `You need at least $5 balance to create an agent. Run ${orange("clawcard billing topup")} to get started.`
373
+ `Account balance is under $5. Run ${orange("clawcard billing topup")} to add funds.`
374
+ );
375
+ }
376
+
377
+ if (!hasAgent && !hasBalance) {
378
+ p.log.info(
379
+ chalk.dim("You need at least $5 balance before creating an agent.")
373
380
  );
374
381
  } else if (!hasAgent) {
375
382
  p.log.warn(
@@ -378,17 +385,15 @@ if (process.argv.length <= 2) {
378
385
  }
379
386
 
380
387
  options = [
381
- ...(!hasBalance
382
- ? [{ value: "topup", label: "Top up my account", hint: "required — minimum $5 to get started" }]
383
- : !hasAgent
384
- ? [{ value: "keys-create", label: "Create agent", hint: "you have balance — create your agent now" }]
385
- : [
386
- { value: "agent", label: "View agent details", hint: "phone, email, budget" },
387
- { value: "agent-fund", label: "Fund my agent", hint: "allocate budget from your balance" },
388
- ]),
389
388
  ...(hasAgent
390
- ? [{ value: "setup", label: "Configure", hint: "install skill for your agent" }]
391
- : []),
389
+ ? [
390
+ { value: "agent", label: "View agent details", hint: "phone, email, budget" },
391
+ { value: "agent-fund", label: "Fund my agent", hint: "allocate budget from your balance" },
392
+ { value: "setup", label: "Configure", hint: "install skill for your agent" },
393
+ ]
394
+ : hasBalance
395
+ ? [{ value: "keys-create", label: "Create agent", hint: "you have balance — create your agent now" }]
396
+ : []),
392
397
  { value: "topup", label: "Top up my account", hint: "add balance (10% fee)" },
393
398
  { value: "referral", label: "Referral", hint: "share & earn $5" },
394
399
  { value: "whoami", label: "Who am I?", hint: "show current account" },