@heyamiko/amiko-cli 0.7.9 → 0.8.0
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 +83 -4
- package/dist/index.js +1308 -91
- package/package.json +3 -2
- package/skills/SKILL.md +76 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# @heyamiko/amiko-cli (v0.
|
|
1
|
+
# @heyamiko/amiko-cli (v0.8.0)
|
|
2
2
|
|
|
3
|
-
Manage wallets, credits, swaps,
|
|
3
|
+
Manage wallets, credits, swaps, MPP marketplace services, and your Amiko twin (identity, documents, voice, avatar, friends, feed, Composio apps) from the terminal. Works for both human users and AI agents running on OpenClaw.
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
@@ -189,6 +189,25 @@ amiko service call POST /v1/music/plan '{"prompt":"Epic orchestral piece"}'
|
|
|
189
189
|
|
|
190
190
|
Audio and image endpoints upload to Supabase Storage and return permanent URLs.
|
|
191
191
|
|
|
192
|
+
## Confirmation Gate for Paid Commands
|
|
193
|
+
|
|
194
|
+
Every paid command (`image`, `search`, `amazon search`, `service tts`, `service stt`, `service chat`, `service call`, `credits topup`) requires explicit approval before spending:
|
|
195
|
+
|
|
196
|
+
- **Human, interactive shell** — the command prints the cost and prompts `Proceed? [y/N]`. Answer `y` to run.
|
|
197
|
+
- **Agent / non-interactive shell** — the command *refuses* to run without `--yes`, with a message telling the agent what to do:
|
|
198
|
+
|
|
199
|
+
```
|
|
200
|
+
Refusing to run without --yes (non-interactive shell detected).
|
|
201
|
+
|
|
202
|
+
This command will cost 5 AMIKO.
|
|
203
|
+
Action: Generate image: a sunset over mountains
|
|
204
|
+
|
|
205
|
+
Quote the cost to the user, get their explicit approval, then re-run with --yes:
|
|
206
|
+
amiko image "a sunset over mountains" --yes
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
This makes cost confirmation effectively mandatory regardless of which model drives the agent — weak models can no longer silently burn tokens by ignoring the skill docs.
|
|
210
|
+
|
|
192
211
|
## Error Output
|
|
193
212
|
|
|
194
213
|
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:
|
|
@@ -304,21 +323,81 @@ src/
|
|
|
304
323
|
│ ├── discovery.ts # MPP service info
|
|
305
324
|
│ ├── login.ts # Privy browser login
|
|
306
325
|
│ ├── config.ts # config management
|
|
307
|
-
│
|
|
326
|
+
│ ├── update.ts # self-update
|
|
327
|
+
│ ├── accounts.ts # accounts, info (twin identity readout)
|
|
328
|
+
│ ├── twin.ts # twin:update (name/description/public)
|
|
329
|
+
│ ├── docs.ts # RAG documents (list, upload, delete, presign)
|
|
330
|
+
│ ├── voice.ts # voice:design, voice:create, voice:clone, voice:reset
|
|
331
|
+
│ ├── avatar.ts # avatar:update
|
|
332
|
+
│ ├── friends.ts # friends list, add, accept, remove
|
|
333
|
+
│ ├── feed.ts # feed, post:comment
|
|
334
|
+
│ └── composio.ts # composio:connect, composio:disconnect
|
|
308
335
|
└── lib/
|
|
309
336
|
├── config.ts # ~/.amiko/config.json
|
|
310
337
|
├── agent-config.ts # .amiko.json reader + auth resolution
|
|
311
338
|
├── api.ts # HTTP client (MPP + billing)
|
|
312
|
-
├──
|
|
339
|
+
├── amiko-web.ts # HTTP client for amiko-web (twin + social REST)
|
|
340
|
+
├── twin-context.ts # resolveTwinId (--twin | .amiko.json | config.twinId)
|
|
341
|
+
├── file-input.ts # path | https URL | stdin → Buffer + mime
|
|
342
|
+
├── format.ts # terminal output helpers + renderOutput(--json)
|
|
343
|
+
├── confirm.ts # requireApproval + confirmDestructive
|
|
313
344
|
├── mpp-topup.ts # MPP SDK topup helper
|
|
314
345
|
├── across.ts # Across Protocol bridge
|
|
315
346
|
└── tempo.ts # Tempo chain helpers
|
|
316
347
|
```
|
|
317
348
|
|
|
349
|
+
## Twin & Social Commands (v0.8.0)
|
|
350
|
+
|
|
351
|
+
The CLI also manages the twin's identity, documents, voice, avatar, friends, feed, and Composio connections via the amiko-web platform API.
|
|
352
|
+
|
|
353
|
+
```bash
|
|
354
|
+
# Identity
|
|
355
|
+
amiko accounts # show resolved identity (mode, platform, user, twin, wallets)
|
|
356
|
+
amiko info # fetch twin info (name, description, voice, avatar, visibility)
|
|
357
|
+
amiko twin:update --name "New Name"
|
|
358
|
+
amiko twin:update --description "Bio"
|
|
359
|
+
amiko twin:update --public true --yes # change public visibility (destructive)
|
|
360
|
+
|
|
361
|
+
# Documents (RAG)
|
|
362
|
+
amiko docs # list
|
|
363
|
+
amiko docs:upload ./notes.pdf # path, URL, or `- --stdin`
|
|
364
|
+
amiko docs:delete <docId> --yes
|
|
365
|
+
amiko docs:presign ./file.pdf # presigned S3 URL only
|
|
366
|
+
|
|
367
|
+
# Voice
|
|
368
|
+
amiko voice:design --description "warm, low, male, confident, measured"
|
|
369
|
+
amiko voice:create --sample <generated_voice_id>
|
|
370
|
+
amiko voice:clone ./me.mp3
|
|
371
|
+
amiko voice:reset --yes
|
|
372
|
+
|
|
373
|
+
# Avatar
|
|
374
|
+
amiko avatar:update --file ./portrait.png --yes
|
|
375
|
+
|
|
376
|
+
# Friends
|
|
377
|
+
amiko friends # list
|
|
378
|
+
amiko friends:add --id <userId>
|
|
379
|
+
amiko friends:accept <friendshipId>
|
|
380
|
+
amiko friends:remove <friendshipId> --yes
|
|
381
|
+
|
|
382
|
+
# Feed & posts
|
|
383
|
+
amiko feed # friends feed (default)
|
|
384
|
+
amiko feed --type for_you --limit 20
|
|
385
|
+
amiko post:comment --id <postId> --comment "great post"
|
|
386
|
+
|
|
387
|
+
# Composio
|
|
388
|
+
amiko composio:connect --app gmail # prints OAuth URL
|
|
389
|
+
amiko composio:disconnect --app gmail --yes
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
Every new command accepts `--json` for structured output and `--twin <id>` where a target twin is needed.
|
|
393
|
+
|
|
394
|
+
**Destructive or identity-changing commands** (`docs:delete`, `friends:remove`, `composio:disconnect`, `voice:reset`, `avatar:update`, `twin:update --public`) prompt for confirmation in a TTY and require `--yes` in non-interactive shells.
|
|
395
|
+
|
|
318
396
|
## API Endpoints
|
|
319
397
|
|
|
320
398
|
| Client | Base URL | Purpose |
|
|
321
399
|
|--------|----------|---------|
|
|
400
|
+
| Amiko Web | `platform.heyamiko.com` | Twin identity, docs, voice, avatar, friends, feed, Composio |
|
|
322
401
|
| MPP API | `mpp.amikomarkets.com` | Marketplace services, search, image, audio |
|
|
323
402
|
| Billing API | `billing.heyamiko.com` | Credits, topup, wallet balances, keys |
|
|
324
403
|
|