@bankr/cli 0.2.11 → 0.2.13

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/README.md CHANGED
@@ -15,7 +15,7 @@ npm install -g @bankr/cli
15
15
  bankr login
16
16
 
17
17
  # Send a prompt
18
- bankr prompt "what's trending on base?"
18
+ bankr agent "what's trending on base?"
19
19
 
20
20
  # Or use the shorthand (no subcommand)
21
21
  bankr "what is the price of ETH?"
@@ -60,17 +60,17 @@ bankr logout
60
60
 
61
61
  ```bash
62
62
  # Send a prompt and wait for the response
63
- bankr prompt "swap 10 USDC to ETH on base"
63
+ bankr agent "swap 10 USDC to ETH on base"
64
64
 
65
65
  # Shorthand — just pass the prompt directly
66
66
  bankr "what are the top holders of VIRTUAL?"
67
67
 
68
68
  # Continue the most recent conversation
69
- bankr prompt --continue "and what about SOL?"
70
- bankr prompt -c "compare them"
69
+ bankr agent --continue "and what about SOL?"
70
+ bankr agent -c "compare them"
71
71
 
72
72
  # Continue a specific thread
73
- bankr prompt --thread thr_ABC123 "tell me more"
73
+ bankr agent --thread thr_ABC123 "tell me more"
74
74
  ```
75
75
 
76
76
  ### Token Launch
@@ -95,10 +95,10 @@ bankr launch --name "TESTCOIN" --fee "0x1234..." --fee-type wallet -y
95
95
 
96
96
  ```bash
97
97
  # Check the status of a job
98
- bankr status job_ABC123DEF456
98
+ bankr agent status job_ABC123DEF456
99
99
 
100
100
  # Cancel a running job
101
- bankr cancel job_ABC123DEF456
101
+ bankr agent cancel job_ABC123DEF456
102
102
  ```
103
103
 
104
104
  ### Configuration
package/dist/cli.js CHANGED
@@ -564,14 +564,19 @@ program
564
564
  .command("logout")
565
565
  .description("Clear stored credentials")
566
566
  .action(logoutCommand);
567
- // ── Deprecated aliases (kept for backward compat) ──────────────────────
567
+ // ── Deprecated aliases (hidden from help, show runtime warning) ──────
568
+ function deprecatedCmd(oldCmd, newCmd) {
569
+ output.warn(`"bankr ${oldCmd}" is deprecated and will be removed in a future release. Use "bankr ${newCmd}" instead.`);
570
+ console.log();
571
+ }
568
572
  program
569
- .command("balances")
573
+ .command("balances", { hidden: true })
570
574
  .description("Deprecated: use `bankr wallet portfolio` instead")
571
575
  .option("--chain <chains>", "Chain(s) to fetch (comma-separated)")
572
576
  .option("--json", "Output raw JSON")
573
577
  .option("--low-value", "Include low-value tokens (under $1)")
574
578
  .action(async (opts) => {
579
+ deprecatedCmd("balances", "wallet portfolio");
575
580
  await balancesCommand({
576
581
  chain: opts.chain,
577
582
  json: opts.json,
@@ -579,29 +584,37 @@ program
579
584
  });
580
585
  });
581
586
  program
582
- .command("prompt [text...]")
587
+ .command("prompt [text...]", { hidden: true })
583
588
  .description("Deprecated: use `bankr agent <prompt>` instead")
584
589
  .option("--thread <id>")
585
590
  .option("-c, --continue")
586
591
  .option("-m, --model <model>")
587
592
  .action(async (text, opts, cmd) => {
593
+ deprecatedCmd("prompt", "agent <prompt>");
588
594
  opts.model ?? (opts.model = cmd.parent?.opts()?.model);
589
595
  const joined = text.join(" ").trim();
590
596
  await promptCommand(joined || (await readPromptInput()), opts);
591
597
  });
592
598
  program
593
- .command("status <jobId>")
599
+ .command("status <jobId>", { hidden: true })
594
600
  .description("Deprecated: use `bankr agent status` instead")
595
- .action(statusCommand);
601
+ .action(async (jobId) => {
602
+ deprecatedCmd("status", "agent status");
603
+ await statusCommand(jobId);
604
+ });
596
605
  program
597
- .command("cancel <jobId>")
606
+ .command("cancel <jobId>", { hidden: true })
598
607
  .description("Deprecated: use `bankr agent cancel` instead")
599
- .action(cancelCommand);
608
+ .action(async (jobId) => {
609
+ deprecatedCmd("cancel", "agent cancel");
610
+ await cancelCommand(jobId);
611
+ });
600
612
  const profileAliasCmd = program
601
- .command("profile")
613
+ .command("profile", { hidden: true })
602
614
  .description("Deprecated: use `bankr agent profile` instead")
603
615
  .option("--json", "Output raw JSON")
604
616
  .action(async (opts) => {
617
+ deprecatedCmd("profile", "agent profile");
605
618
  await profileViewCommand({ json: opts.json });
606
619
  });
607
620
  profileAliasCmd
@@ -613,6 +626,7 @@ profileAliasCmd
613
626
  .option("--website <url>", "Project website URL")
614
627
  .option("--json", "Output raw JSON")
615
628
  .action(async (opts) => {
629
+ deprecatedCmd("profile create", "agent profile create");
616
630
  await profileCreateCommand({
617
631
  name: opts.name,
618
632
  description: opts.description,
@@ -631,6 +645,7 @@ profileAliasCmd
631
645
  .option("--website <url>", "Project website URL")
632
646
  .option("--json", "Output raw JSON")
633
647
  .action(async (opts) => {
648
+ deprecatedCmd("profile update", "agent profile update");
634
649
  await profileUpdateCommand({
635
650
  name: opts.name,
636
651
  description: opts.description,
@@ -640,13 +655,17 @@ profileAliasCmd
640
655
  json: opts.json,
641
656
  });
642
657
  });
643
- profileAliasCmd.command("delete").action(profileDeleteCommand);
658
+ profileAliasCmd.command("delete").action(async () => {
659
+ deprecatedCmd("profile delete", "agent profile delete");
660
+ await profileDeleteCommand();
661
+ });
644
662
  profileAliasCmd
645
663
  .command("add-update")
646
664
  .option("--title <title>", "Update title")
647
665
  .option("--content <text>", "Update content")
648
666
  .option("--json", "Output raw JSON")
649
667
  .action(async (opts) => {
668
+ deprecatedCmd("profile add-update", "agent profile add-update");
650
669
  await profileAddUpdateCommand({
651
670
  title: opts.title,
652
671
  content: opts.content,
@@ -654,13 +673,14 @@ profileAliasCmd
654
673
  });
655
674
  });
656
675
  program
657
- .command("sign")
676
+ .command("sign", { hidden: true })
658
677
  .description("Deprecated: use `bankr wallet sign` instead")
659
678
  .requiredOption("-t, --type <type>", "Signature type")
660
679
  .option("-m, --message <message>", "Message to sign")
661
680
  .option("--typed-data <json>", "EIP-712 typed data as JSON")
662
681
  .option("--transaction <json>", "Transaction as JSON")
663
682
  .action(async (opts) => {
683
+ deprecatedCmd("sign", "wallet sign");
664
684
  await signCommand({
665
685
  type: opts.type,
666
686
  message: opts.message,
@@ -669,7 +689,7 @@ program
669
689
  });
670
690
  });
671
691
  const submitAliasCmd = program
672
- .command("submit")
692
+ .command("submit", { hidden: true })
673
693
  .description("Deprecated: use `bankr wallet submit` instead");
674
694
  submitAliasCmd
675
695
  .command("tx")
@@ -686,6 +706,7 @@ submitAliasCmd
686
706
  .option("-d, --description <text>", "Description")
687
707
  .option("--no-wait", "Don't wait for confirmation")
688
708
  .action(async (opts) => {
709
+ deprecatedCmd("submit tx", "wallet submit tx");
689
710
  await submitCommand({
690
711
  to: opts.to,
691
712
  chainId: opts.chainId,
@@ -706,6 +727,7 @@ submitAliasCmd
706
727
  .option("-d, --description <text>", "Description")
707
728
  .option("--no-wait", "Don't wait for confirmation")
708
729
  .action(async (transaction, opts) => {
730
+ deprecatedCmd("submit json", "wallet submit json");
709
731
  await submitJsonCommand(transaction, {
710
732
  noWait: !opts.wait,
711
733
  description: opts.description,
@@ -484,7 +484,9 @@ export async function creditsAddCommand(amount, opts) {
484
484
  });
485
485
  spin.stop();
486
486
  if (res.status === 402) {
487
- output.error("Insufficient wallet balance. Add funds to your wallet first.");
487
+ const errBody = (await res.json().catch(() => ({})));
488
+ output.error(errBody.error ??
489
+ "Insufficient wallet balance. Add funds to your wallet first.");
488
490
  process.exit(1);
489
491
  }
490
492
  if (res.status === 403) {
@@ -5,9 +5,34 @@ import * as output from "../lib/output.js";
5
5
  /** Valid Max Mode model IDs — hardcoded because CLI is standalone (no monorepo imports).
6
6
  * Must be manually kept in sync with models in the LLM gateway DB. */
7
7
  const VALID_MAX_MODE_MODELS = new Set([
8
+ // Claude (Vertex AI)
8
9
  "claude-opus-4.6",
10
+ "claude-opus-4.5",
9
11
  "claude-sonnet-4.6",
12
+ "claude-sonnet-4.5",
13
+ "claude-haiku-4.5",
14
+ // Gemini (Vertex AI)
10
15
  "gemini-3.1-pro",
16
+ "gemini-3-pro",
17
+ "gemini-2.5-pro",
18
+ // OpenAI (OpenRouter)
19
+ "gpt-5.4",
20
+ "gpt-5.4-mini",
21
+ "gpt-5.2",
22
+ "gpt-5-mini",
23
+ // Grok (OpenRouter)
24
+ "grok-4.1-fast",
25
+ // DeepSeek (OpenRouter)
26
+ "deepseek-v3.2",
27
+ // Qwen (OpenRouter)
28
+ "qwen3-coder",
29
+ "qwen3.5-plus",
30
+ // MiniMax (direct)
31
+ "minimax-m2.5",
32
+ "minimax-m2.7",
33
+ // Other (OpenRouter)
34
+ "kimi-k2.5",
35
+ "glm-5",
11
36
  ]);
12
37
  export async function promptCommand(text, options = {}) {
13
38
  requireApiKey();
@@ -296,6 +296,18 @@ export async function x402ConfigureCommand(name) {
296
296
  default: existing.methods?.[0] ?? "GET",
297
297
  theme: output.bankrTheme,
298
298
  });
299
+ const paymentScheme = await select({
300
+ message: "Payment scheme:",
301
+ choices: [
302
+ { name: "exact — client pays exactly the listed price", value: "exact" },
303
+ {
304
+ name: "upto — client authorizes a max; server settles actual cost",
305
+ value: "upto",
306
+ },
307
+ ],
308
+ default: existing.paymentScheme ?? "exact",
309
+ theme: output.bankrTheme,
310
+ });
299
311
  config.services[name] = {
300
312
  ...existing,
301
313
  description,
@@ -303,6 +315,7 @@ export async function x402ConfigureCommand(name) {
303
315
  currency,
304
316
  network,
305
317
  methods: method === "*" ? undefined : [method],
318
+ paymentScheme,
306
319
  };
307
320
  saveConfigFile(root, config);
308
321
  output.success(`Updated config for "${name}"`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bankr/cli",
3
- "version": "0.2.11",
3
+ "version": "0.2.13",
4
4
  "description": "Official CLI for the Bankr AI agent platform",
5
5
  "type": "module",
6
6
  "bin": {