@bankr/cli 0.3.37 → 0.3.43
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 +51 -156
- package/dist/cli.js +162 -150
- package/dist/commands/fees.js +17 -7
- package/dist/commands/llm.js +64 -0
- package/dist/commands/login.d.ts +75 -0
- package/dist/commands/login.js +321 -60
- package/dist/commands/{profile.d.ts → project.d.ts} +6 -6
- package/dist/commands/{profile.js → project.js} +65 -65
- package/dist/commands/prompt.d.ts +11 -0
- package/dist/commands/prompt.js +20 -11
- package/dist/commands/status.d.ts +5 -1
- package/dist/commands/status.js +54 -5
- package/dist/commands/update.js +2 -3
- package/dist/commands/x402.js +2 -2
- package/dist/lib/api.d.ts +29 -8
- package/dist/lib/api.js +26 -12
- package/dist/lib/config.d.ts +2 -1
- package/dist/lib/config.js +18 -2
- package/dist/lib/output.d.ts +2 -0
- package/dist/lib/output.js +4 -0
- package/dist/lib/statusUpdates.d.ts +14 -0
- package/dist/lib/statusUpdates.js +38 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,195 +1,90 @@
|
|
|
1
1
|
# @bankr/cli
|
|
2
2
|
|
|
3
|
-
Official CLI for the [Bankr](https://bankr.bot) AI agent platform.
|
|
3
|
+
Official CLI for the [Bankr](https://bankr.bot) AI agent platform. Prompt the Bankr agent, manage your wallet, launch tokens and claim their fees, and use the Bankr LLM gateway from your terminal.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm install -g @bankr/cli
|
|
9
|
-
```
|
|
5
|
+
The full command reference is at [docs.bankr.bot/cli](https://docs.bankr.bot/cli), and every command takes `--help`.
|
|
10
6
|
|
|
11
|
-
##
|
|
12
|
-
|
|
13
|
-
A [Bankr Club subscription](https://bankr.bot) or LLM credits (Max Mode) is required to use the agent. There is no free tier.
|
|
7
|
+
## Installation
|
|
14
8
|
|
|
15
9
|
```bash
|
|
16
|
-
#
|
|
17
|
-
bankr login
|
|
10
|
+
npm install -g @bankr/cli # or: bun install -g @bankr/cli
|
|
18
11
|
|
|
19
|
-
#
|
|
20
|
-
bankr
|
|
21
|
-
|
|
22
|
-
# Or use the shorthand (no subcommand)
|
|
23
|
-
bankr "what is the price of ETH?"
|
|
12
|
+
# Later: update with whichever package manager installed it
|
|
13
|
+
bankr update
|
|
24
14
|
```
|
|
25
15
|
|
|
26
|
-
##
|
|
27
|
-
|
|
28
|
-
### Authentication
|
|
16
|
+
## Log in
|
|
29
17
|
|
|
30
18
|
```bash
|
|
31
|
-
#
|
|
19
|
+
# Interactive: sign in with email, open bankr.bot to create a key, or paste one
|
|
32
20
|
bankr login
|
|
33
21
|
|
|
34
|
-
#
|
|
35
|
-
bankr login email
|
|
22
|
+
# Headless email login, for scripts and agents
|
|
23
|
+
bankr login email you@example.com # step 1: send a one-time code
|
|
24
|
+
bankr login email you@example.com --code 123456 # step 2: verify and create an API key (new accounts get a wallet)
|
|
36
25
|
|
|
37
|
-
#
|
|
38
|
-
bankr login email user@example.com # Step 1: send OTP
|
|
39
|
-
bankr login email user@example.com --code 123456 \ # Step 2: verify + complete
|
|
40
|
-
--accept-terms --key-name "My Key" --read-write --llm
|
|
41
|
-
|
|
42
|
-
# Log in directly with an API key (non-interactive)
|
|
26
|
+
# An existing bk_... key from bankr.bot/api-keys (checked against the API before it's saved)
|
|
43
27
|
bankr login --api-key bk_YOUR_KEY
|
|
44
28
|
|
|
45
|
-
#
|
|
46
|
-
bankr login
|
|
47
|
-
|
|
48
|
-
# Print the dashboard URL without opening a browser (non-interactive)
|
|
49
|
-
bankr login --url
|
|
50
|
-
|
|
51
|
-
# Log in with a custom API URL
|
|
52
|
-
bankr login --api-url https://api.bankr.bot
|
|
29
|
+
# Sign-In with Ethereum, for headless agents
|
|
30
|
+
bankr login siwe --private-key 0xYOUR_PRIVATE_KEY
|
|
53
31
|
|
|
54
|
-
# Show
|
|
32
|
+
# Show the key in use, check the connection, and list your account details
|
|
55
33
|
bankr whoami
|
|
56
|
-
|
|
57
|
-
# Clear stored credentials
|
|
58
|
-
bankr logout
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
### Prompts
|
|
62
|
-
|
|
63
|
-
```bash
|
|
64
|
-
# Send a prompt and wait for the response
|
|
65
|
-
bankr agent "swap 10 USDC to ETH on base"
|
|
66
|
-
|
|
67
|
-
# Shorthand — just pass the prompt directly
|
|
68
|
-
bankr "what are the top holders of VIRTUAL?"
|
|
69
|
-
|
|
70
|
-
# Continue the most recent conversation
|
|
71
|
-
bankr agent --continue "and what about SOL?"
|
|
72
|
-
bankr agent -c "compare them"
|
|
73
|
-
|
|
74
|
-
# Continue a specific thread
|
|
75
|
-
bankr agent --thread thr_ABC123 "tell me more"
|
|
76
|
-
|
|
77
|
-
# Max Mode: pick the model. Only the two newest releases of each line, and
|
|
78
|
-
# only frontier / flagship / balanced lines, are accepted (the same set the
|
|
79
|
-
# web picker shows); anything else is rejected and the error lists every
|
|
80
|
-
# valid id.
|
|
81
|
-
bankr agent --model claude-opus-5 "audit this contract"
|
|
82
34
|
```
|
|
83
35
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
# Interactive wizard — guides you through name, image, tweet, and fee recipient
|
|
88
|
-
bankr launch
|
|
89
|
-
|
|
90
|
-
# Non-interactive with all options
|
|
91
|
-
bankr launch --name "TESTCOIN" --image "https://example.com/img.png" \
|
|
92
|
-
--tweet "https://x.com/user/status/123" --fee "@vitalik" --fee-type x -y
|
|
36
|
+
- Completing a headless email login (`--code` or `--ni`) or a SIWE login accepts the [Terms of Service](https://bankr.bot/terms).
|
|
37
|
+
- Email-login keys get Wallet, Agent and Token Launch API access and can transact. Opt out with `--no-wallet-api`, `--no-agent-api`, `--no-token-launch` or `--read-only`, and add LLM gateway access with `--llm`. SIWE keys are read-only unless you pass `--read-write`.
|
|
38
|
+
- On an account with passkey MFA, email login prints a bankr.bot approval link (valid for five minutes) and continues once you approve it with your passkey.
|
|
93
39
|
|
|
94
|
-
|
|
95
|
-
bankr launch --name "TESTCOIN" -y
|
|
40
|
+
## Prompt the agent
|
|
96
41
|
|
|
97
|
-
|
|
98
|
-
bankr launch quotes --chain robinhood # list the quote tokens you can pair with
|
|
99
|
-
bankr launch --name "TESTCOIN" --chain robinhood --quote TSLA -y
|
|
100
|
-
bankr launch --name "TESTCOIN" --chain robinhood --quote musebook -y
|
|
101
|
-
bankr launch --name "TESTCOIN" --chain robinhood --quote BNKR -y # the Robinhood Chain BNKR contract
|
|
102
|
-
|
|
103
|
-
# Fee recipient types: x, farcaster, ens, wallet
|
|
104
|
-
bankr launch --name "TESTCOIN" --fee "vitalik.eth" --fee-type ens -y
|
|
105
|
-
bankr launch --name "TESTCOIN" --fee "0x1234..." --fee-type wallet -y
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
### Job Management
|
|
42
|
+
Prompting the agent from the CLI needs a Bankr Club membership or LLM credits for Max Mode — see [Access](https://docs.bankr.bot/agent/access).
|
|
109
43
|
|
|
110
44
|
```bash
|
|
111
|
-
|
|
112
|
-
bankr agent
|
|
113
|
-
|
|
114
|
-
|
|
45
|
+
bankr "what is the price of ETH?" # shorthand for bankr agent
|
|
46
|
+
bankr agent "swap 10 USDC to ETH on base"
|
|
47
|
+
bankr agent --continue "and what about SOL?" # continue the last thread (-c)
|
|
48
|
+
bankr agent --thread thr_ABC123 "tell me more"
|
|
49
|
+
bankr agent --model claude-opus-5 "audit this contract" # Max Mode, billed to LLM credits
|
|
50
|
+
echo 'buy $50 of ETH on base' | bankr agent prompt # piped prompt; single quotes keep $50 intact
|
|
51
|
+
bankr agent status job_ABC123DEF456 --wait # follow a job until it finishes
|
|
115
52
|
bankr agent cancel job_ABC123DEF456
|
|
116
53
|
```
|
|
117
54
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
Launch Claude Code / OpenCode routed through the Bankr gateway:
|
|
121
|
-
|
|
122
|
-
```bash
|
|
123
|
-
# Claude Code — `bankr claude` is a top-level alias for `bankr llm claude`
|
|
124
|
-
# (auto-translates dotted model IDs to the Anthropic wire format)
|
|
125
|
-
bankr claude --model claude-opus-5
|
|
126
|
-
|
|
127
|
-
# Or use dotted form — bankr claude rewrites it to claude-opus-4-8
|
|
128
|
-
bankr claude --model claude-opus-4.8
|
|
129
|
-
|
|
130
|
-
# The [1m] suffix is optional via the gateway, but MUST be quoted if used
|
|
131
|
-
# (zsh reads [1m] as a glob)
|
|
132
|
-
bankr claude --model "claude-opus-5[1m]"
|
|
55
|
+
The agent's progress lines print on stderr while it works, so they stay out of piped output.
|
|
133
56
|
|
|
134
|
-
|
|
135
|
-
bankr llm opencode -m bankr/claude-opus-4.8
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
Because `claude` is a command, it shadows the default prompt fallthrough:
|
|
139
|
-
`bankr claude ...` launches Claude Code rather than prompting the agent. Use
|
|
140
|
-
`bankr agent "..."` to send the agent a prompt starting with that word.
|
|
141
|
-
|
|
142
|
-
**Claude Code model format**: Claude Code's `--model` flag expects Anthropic
|
|
143
|
-
wire IDs, which use dashes rather than dots in the version (`claude-opus-5`,
|
|
144
|
-
`claude-sonnet-5`, `claude-opus-4-8`, `claude-haiku-4-5`). If you pass the
|
|
145
|
-
gateway-canonical dotted form (`claude-opus-4.8`), Claude Code silently falls
|
|
146
|
-
back to its default — the flag appears honored but the real request is a
|
|
147
|
-
different model.
|
|
148
|
-
|
|
149
|
-
`bankr claude` translates dotted → dashed for you. If you use older
|
|
150
|
-
versions of the CLI (or invoke `claude` directly via `ANTHROPIC_BASE_URL`),
|
|
151
|
-
pass the dashed form explicitly.
|
|
152
|
-
|
|
153
|
-
**1M context tier**: the gateway strips Claude Code's `[1m]` suffix and enables
|
|
154
|
-
the 1M beta from the model's own context window, so it's **optional here** —
|
|
155
|
-
`claude-opus-5` and `claude-opus-5[1m]` send an identical upstream request. If
|
|
156
|
-
you do use it, **quote it**: in zsh (the macOS default) `[1m]` is a glob
|
|
157
|
-
character class, so an unquoted id aborts with `zsh: no matches found:
|
|
158
|
-
claude-opus-5[1m]` before the CLI ever runs. Bash passes it through literally,
|
|
159
|
-
so the same command can work on one machine and fail on another.
|
|
160
|
-
|
|
161
|
-
### Configuration
|
|
162
|
-
|
|
163
|
-
```bash
|
|
164
|
-
# View all config
|
|
165
|
-
bankr config get
|
|
57
|
+
## Commands
|
|
166
58
|
|
|
167
|
-
|
|
168
|
-
|
|
59
|
+
| Command | What it does |
|
|
60
|
+
| -------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
|
|
61
|
+
| `bankr wallet` | Portfolio, transfer, swap, sign and submit, without the agent |
|
|
62
|
+
| `bankr tokens` | Token search and info |
|
|
63
|
+
| `bankr launch` | Launch a token on Base, Robinhood Chain or Arbitrum; `bankr launch quotes` lists the tokens a launch can pair with |
|
|
64
|
+
| `bankr fees` | Creator-fee dashboard and claims, including `fees claim-wallet` with your own private key |
|
|
65
|
+
| `bankr llm`, `bankr claude` | LLM gateway: models, credits and auto top-up, coding-tool config, and Claude Code or OpenCode run through the gateway |
|
|
66
|
+
| `bankr project` | Your project page |
|
|
67
|
+
| `bankr club` | Bankr Club status, sign-up and cancellation |
|
|
68
|
+
| `bankr files` | Your wallet's file storage |
|
|
69
|
+
| `bankr x402`, `bankr webhooks` | Deploy and manage paid x402 endpoints and webhooks that trigger the agent |
|
|
70
|
+
| `bankr config`, `bankr sounds`, `bankr update`, `bankr logout` | Settings and maintenance |
|
|
169
71
|
|
|
170
|
-
|
|
171
|
-
bankr config set apiUrl https://api.bankr.bot
|
|
72
|
+
Add `--ni` (or set `BANKR_NOT_INTERACTIVE=1`) to any command to skip confirmations and fail fast instead of prompting.
|
|
172
73
|
|
|
173
|
-
|
|
174
|
-
bankr config set llmKey YOUR_LLM_KEY
|
|
175
|
-
```
|
|
74
|
+
The package also exports its API client (`submitPrompt`, `pollJob`, `getUserInfo`, `getBalances` and more) for Node.js — see [Programmatic usage](https://docs.bankr.bot/cli#programmatic-usage).
|
|
176
75
|
|
|
177
76
|
## Configuration
|
|
178
77
|
|
|
179
|
-
Credentials are stored in `~/.bankr/config.json
|
|
180
|
-
|
|
181
|
-
Environment variables override stored values:
|
|
182
|
-
|
|
183
|
-
| Variable | Description |
|
|
184
|
-
| --------------- | ---------------------------------------------------------- |
|
|
185
|
-
| `BANKR_API_KEY` | API key (overrides stored key) |
|
|
186
|
-
| `BANKR_API_URL` | API URL (default: `https://api.bankr.bot`) |
|
|
187
|
-
| `BANKR_LLM_KEY` | LLM gateway key (falls back to `BANKR_API_KEY` if not set) |
|
|
188
|
-
| `BANKR_LLM_URL` | LLM gateway URL (default: `https://llm.bankr.bot`) |
|
|
78
|
+
Credentials are stored in `~/.bankr/config.json`; use `--config <path>` or `BANKR_CONFIG` for another file. Environment variables override stored values:
|
|
189
79
|
|
|
190
|
-
|
|
80
|
+
| Variable | Description |
|
|
81
|
+
| --------------- | ------------------------------------------------------ |
|
|
82
|
+
| `BANKR_API_KEY` | API key |
|
|
83
|
+
| `BANKR_LLM_KEY` | LLM gateway key (falls back to the API key if not set) |
|
|
84
|
+
| `BANKR_API_URL` | API URL (default: `https://api.bankr.bot`) |
|
|
85
|
+
| `BANKR_LLM_URL` | LLM gateway URL (default: `https://llm.bankr.bot`) |
|
|
191
86
|
|
|
192
|
-
|
|
87
|
+
Read and set stored values with `bankr config get|set apiKey|apiUrl|llmKey|llmUrl`.
|
|
193
88
|
|
|
194
89
|
## License
|
|
195
90
|
|