@heyamiko/amiko-cli 0.7.7 → 0.7.8

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/README.md +44 -9
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @heyamiko/amiko-cli (v0.7.0)
1
+ # @heyamiko/amiko-cli (v0.7.8)
2
2
 
3
3
  Manage wallets, credits, swaps, and MPP marketplace services from the terminal. Works for both human users and AI agents running on OpenClaw.
4
4
 
@@ -63,23 +63,43 @@ amiko whoami # show current auth status
63
63
 
64
64
  ```bash
65
65
  amiko credits balance # credit balance + wallet balances across all chains
66
- amiko credits topup <amount> # top up credits (amount in credits, e.g. 10000)
66
+ amiko credits topup <amount> # top up credits (positional amount is credits)
67
67
  ```
68
68
 
69
- **Top-up options:**
69
+ **10,000 credits = $1.00 USD.**
70
+
71
+ **Three input forms — pick one.** The topup command accepts exactly one of:
72
+
73
+ | Form | Meaning | Example |
74
+ |------|---------|---------|
75
+ | `<amount>` (positional) | credits | `topup 10000 --token AMIKO` → 10,000 credits = $1 |
76
+ | `--usd <n>` | US dollars | `topup --usd 5 --token USDC` → $5 = 50,000 credits |
77
+ | `--spend <n>` | spend N of `--token`, price-converted live | `topup --spend 1 --token SOL` → "1 SOL worth of credits" |
78
+
79
+ Map user intent directly to the form, no manual price math needed:
80
+
81
+ ```bash
82
+ amiko credits topup --spend 1 --token SOL # "1 SOL worth of credits"
83
+ amiko credits topup --spend 1 --token USDC # "1 USDC worth of credits"
84
+ amiko credits topup --usd 5 --token USDC # "$5 worth of credits"
85
+ amiko credits topup 10000 --token AMIKO # 10,000 credits in AMIKO
86
+ ```
87
+
88
+ **Confirmation.** Every topup prints a `Top-up Summary` (credits, cost in tokens, USD, source wallet) and then waits at `Proceed? [y/N]` on stdin. Pass `--yes` to skip (only after you've shared the summary with the user).
89
+
90
+ **Other flags:**
70
91
 
71
92
  ```bash
72
- amiko credits topup 10000 # auto-select best wallet + token
73
- amiko credits topup 10000 --token AMIKO # use AMIKO (Solana)
74
- amiko credits topup 10000 --token USDC --chain base # use USDC on Base
75
- amiko credits topup 5000 --method mpp # use MPP 402 payment
76
- amiko credits topup 10000 --wallet Gu2b...QVya # specific wallet address
77
- amiko credits topup 10000 --yes # skip confirmation
93
+ amiko credits topup 10000 --token USDC --chain base # USDC on Base
94
+ amiko credits topup 5000 --method mpp # MPP 402 payment
95
+ amiko credits topup 10000 --wallet Gu2b...QVya # specific wallet
78
96
  ```
79
97
 
80
98
  **Supported tokens:** AMIKO, SOL, USDC, USDT
81
99
  **Supported chains:** Solana, Base, Ethereum, Tempo
82
100
 
101
+ **After every paid command, the CLI prints a `Balance: N credits (~$X.XX)` line** so agents can relay the remaining balance to the user without a separate `credits balance` call.
102
+
83
103
  ## Search
84
104
 
85
105
  ```bash
@@ -103,6 +123,8 @@ amiko image "banner" --raw # raw JSON
103
123
 
104
124
  Costs 5 AMIKO per image. Returns a Supabase Storage URL.
105
125
 
126
+ Image generation typically takes 20–60s. In non-TTY environments (agents, piped shells), the CLI prints a `…still working (Ns elapsed)` tick to stderr every 3s so the parent process can tell it hasn't hung.
127
+
106
128
  ## Amazon
107
129
 
108
130
  ```bash
@@ -167,6 +189,19 @@ amiko service call POST /v1/music/plan '{"prompt":"Epic orchestral piece"}'
167
189
 
168
190
  Audio and image endpoints upload to Supabase Storage and return permanent URLs.
169
191
 
192
+ ## Error Output
193
+
194
+ When a paid command fails (payment already sent, but the upstream service returned 4xx/5xx), the CLI prints the actual upstream response body so you can see the real failure reason:
195
+
196
+ ```
197
+ Service call failed: 400 Bad Request
198
+ Response body:
199
+ Prompt failed upstream content moderation. Try rephrasing.
200
+ Payment tx: https://solscan.io/tx/2mtcNTkYksJz2j15...
201
+ ```
202
+
203
+ JSON `error` / `message` / `detail` fields are extracted when present; raw body up to 2000 chars otherwise. Agents should relay this verbatim to the user instead of guessing at reasons.
204
+
170
205
  ## Wallet
171
206
 
172
207
  ```bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heyamiko/amiko-cli",
3
- "version": "0.7.7",
3
+ "version": "0.7.8",
4
4
  "description": "Amiko CLI — swap tokens, manage credits, bridge cross-chain, and call marketplace agents",
5
5
  "type": "module",
6
6
  "bin": {