@heyamiko/amiko-cli 0.7.7 → 0.7.9
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 +56 -10
- package/package.json +1 -1
- package/skills/SKILL.md +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @heyamiko/amiko-cli (v0.7.
|
|
1
|
+
# @heyamiko/amiko-cli (v0.7.9)
|
|
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
|
|
66
|
+
amiko credits topup <amount> # top up credits (positional amount is credits)
|
|
67
67
|
```
|
|
68
68
|
|
|
69
|
-
**
|
|
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
|
|
73
|
-
amiko credits topup
|
|
74
|
-
amiko credits topup 10000 --
|
|
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
|
|
@@ -186,10 +221,21 @@ amiko wallet fund # fund via Tempo dashboard
|
|
|
186
221
|
amiko discovery # MPP service info + pricing
|
|
187
222
|
amiko config show # view config
|
|
188
223
|
amiko config set <key> <value> # set config value
|
|
189
|
-
amiko update # update CLI to latest
|
|
224
|
+
amiko update # update CLI to latest (full twin refresh — no restart needed)
|
|
190
225
|
amiko --help # all commands
|
|
191
226
|
```
|
|
192
227
|
|
|
228
|
+
### `amiko update` on twins
|
|
229
|
+
|
|
230
|
+
On Claude/Amiko twin containers, the CLI is persisted to `/data/.amiko-cli/` so updates survive restarts, and `/usr/local/bin/amiko` is symlinked into that directory. Running `amiko update`:
|
|
231
|
+
|
|
232
|
+
1. `npm install -g @heyamiko/amiko-cli@latest` (global package update)
|
|
233
|
+
2. If `/data/.amiko-cli/` exists (i.e. we're on a twin), copy the new package over it
|
|
234
|
+
3. Refresh the `/usr/local/bin/amiko` symlink
|
|
235
|
+
4. Copy the updated `skills/SKILL.md` to both `/data/.openclaw/skills/amiko-cli/` and `/data/.openclaw/workspace/skills/amiko-cli/` so the agent sees the new docs immediately
|
|
236
|
+
|
|
237
|
+
The result is a one-shot upgrade — no container redeploy required. On non-twin machines (local dev, CI) step (2)–(4) are skipped.
|
|
238
|
+
|
|
193
239
|
## Agent Integration (OpenClaw)
|
|
194
240
|
|
|
195
241
|
### Install as OpenClaw plugin
|
package/package.json
CHANGED
package/skills/SKILL.md
CHANGED
|
@@ -147,7 +147,7 @@ amiko bridge send 10 --from solana --to tempo # execute bridge
|
|
|
147
147
|
amiko wallet balance [address] # USDC.e balance on Tempo
|
|
148
148
|
amiko discovery # MPP service info + pricing
|
|
149
149
|
amiko config show # view config
|
|
150
|
-
amiko update # update CLI to latest
|
|
150
|
+
amiko update # update CLI to latest (on twins: also refreshes /data, symlink, skill)
|
|
151
151
|
amiko --help # all commands
|
|
152
152
|
```
|
|
153
153
|
|