@heyamiko/amiko-cli 0.12.0-beta.8 → 0.14.0-beta.10

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
@@ -1,4 +1,4 @@
1
- # @heyamiko/amiko-cli (v0.12.0-beta.7)
1
+ # @heyamiko/amiko-cli (v0.14.0-beta.0)
2
2
 
3
3
  Manage wallets, credits, swaps, MPP marketplace services, and your Amiko twin (identity, documents, voice, avatar, friends, feed) from the terminal. Works for both human users and AI agents running on OpenClaw.
4
4
 
@@ -47,6 +47,7 @@ amiko wallets swap send 1.0 SOL USDC --yes
47
47
  # Call any MPP service
48
48
  amiko markets service list
49
49
  amiko markets service call POST /v1/sfx '{"text":"thunder","duration_seconds":5}'
50
+ amiko markets service call GET /v1/x/search?q=ai --usdt auto # pay any endpoint in USDT
50
51
  ```
51
52
 
52
53
  ## Credits
@@ -93,12 +94,13 @@ amiko credits topup 10000 --wallet Gu2b...QVya # specific wallet (else de
93
94
  ## Search
94
95
 
95
96
  ```bash
96
- amiko markets search "AI agents" # search X/Twitter (1 AMIKO)
97
- amiko markets search "bitcoin" --token USDC # pay with USDC instead
97
+ amiko markets search "AI agents" # search X/Twitter ($0.01 in AMIKO at spot)
98
+ amiko markets search "bitcoin" --token USDT # pay 0.01 USDT directly (no swap)
99
+ amiko markets search "solana" --token USDC # or USDC
98
100
  amiko markets search "news" --raw # raw JSON output
99
101
  ```
100
102
 
101
- Pays 1 AMIKO per search via Crossmint wallet transfer. Tries Solana wallet first, falls back to EVM.
103
+ Each search is anchored at $0.01. The CLI quotes the real token amount before the approval gate — AMIKO converts at the live platform spot; USDC/USDT are pinned at $1.00 so the amount equals the USD price. Payment is a Crossmint wallet transfer from your Solana wallet; the tx rides to MPP as `X-Payment-Tx` + `X-Payment-Token`.
102
104
 
103
105
  ## Image Generation
104
106
 
@@ -121,9 +123,12 @@ Image generation typically takes 20–60s. In non-TTY environments (agents, pipe
121
123
  The CLI half of the platform's Create Studio. `amiko create` generates media through Amiko's own authenticated endpoints (not the raw MPP pay-per-call surface `amiko markets` uses). Generation runs **asynchronously** and is **charged on success** from your twin's wallet — a failed or timed-out generation is never billed, and there's no up-front payment.
122
124
 
123
125
  ```bash
124
- amiko create image "a sunset over mountains" # default gpt-image-2, 1:1
125
- amiko create image "logo" --aspect 16:9 --model gpt-image-2 # widescreen
126
+ amiko create image "a sunset over mountains" # default nano-banana-2, 1:1
127
+ amiko create image "logo" --aspect 16:9 --model gpt-image-2 # widescreen, OpenAI
126
128
  amiko create video "a whale in space" --resolution 768P --seconds 6
129
+ amiko create video "animate cover" --first-frame https://.../cover.png --yes
130
+ amiko create video "dance clip" --model dreamina-seedance-2-0-fast-260128 \
131
+ --reference-image https://.../ref1.png --reference-audio https://.../beat.mp3 --generate-audio --yes
127
132
  amiko create tts "Hello world" --voice 21m00Tcm4TlvDq8ikWAM
128
133
  amiko create music "lo-fi chill beat" --duration 30000
129
134
  amiko create music --lyrics "..." --instrumental # instrumental
@@ -145,18 +150,27 @@ Modes: `image`, `video`, `tts`, `music`, `sfx` (mirrors the platform Create Stud
145
150
 
146
151
  | Flag | Default | Description |
147
152
  |------|---------|-------------|
148
- | `--model <model>` | `gpt-image-2` | Image model |
153
+ | `--model <model>` | `nano-banana-2` | Image model (`nano-banana[-2|-lite|-pro]`, `gpt-image-*`, `grok-imagine-image-quality`, `image-01`) |
149
154
  | `--aspect <ratio>` | `1:1` | Aspect ratio: `1:1`, `16:9`, `9:16`, `4:3`, `3:4` |
150
155
 
151
156
  **`amiko create video <prompt>`**
152
157
 
153
158
  | Flag | Default | Description |
154
159
  |------|---------|-------------|
155
- | `--model <model>` | `MiniMax-Hailuo-2.3-Fast` | Video model |
160
+ | `--model <model>` | `MiniMax-Hailuo-2.3-Fast` | Video model (`MiniMax-Hailuo-*`, `dreamina-seedance-2-0-fast-260128`, …) |
156
161
  | `--resolution <res>` | `768P` | `512P`, `720P`, `768P`, `1080P` |
157
162
  | `--seconds <n>` | `6` | Clip length: `6` or `10` |
158
163
  | `--aspect <ratio>` | — | Aspect ratio (provider-dependent) |
159
164
  | `--first-frame <url>` | — | Image-to-video: first frame URL or data URI |
165
+ | `--last-frame <url>` | — | First-and-last-frame video: ending frame URL or data URI |
166
+ | `--reference-image <url>` | — | Seedance multimodal reference image (repeatable, max 9) |
167
+ | `--reference-video <url>` | — | Seedance multimodal reference video (repeatable, max 3) |
168
+ | `--reference-audio <url>` | — | Seedance multimodal reference audio (repeatable, max 3) |
169
+ | `--subject-reference <url>` | — | MiniMax S2V subject/character reference image |
170
+ | `--generate-audio` | — | Seedance: generate audio in the output |
171
+ | `--no-generate-audio` | — | Seedance: output silent video |
172
+
173
+ Reference flags accept URLs or data URIs (not local paths). Typical I2V flow: `create image` → `create status <jobId>` for the image URL → `create video --first-frame <url>`.
160
174
 
161
175
  **`amiko create tts <text>`**
162
176
 
@@ -220,16 +234,38 @@ amiko chat list --limit 50 --archived # include archived
220
234
  amiko chat read @sophie # recent messages with a user (by @handle)
221
235
  amiko chat read <conversationId> --limit 40 # by conversation id (from `chat list`) — works for groups too
222
236
  amiko chat send @sophie "on my way!" --yes # send as the owner
237
+ amiko chat send <userId> "hey!" --yes # user id works too — the DM is opened automatically
238
+ amiko chat send Mars "hey!" --yes # or a name (friends first, then people search)
223
239
  amiko chat send <groupConversationId> "hi all" --yes # send to a group chat
224
240
  amiko chat send @sophie "look 👀" --image ./cat.png --yes # attach a local image
225
241
  amiko chat send @sophie "made this 🎵" --audio <generated-url> --yes # attach audio (e.g. from `amiko create`)
226
242
  ```
227
243
 
228
- - **`<target>`** for `read`/`send` is a **conversation id** (from `chat list` — use this for groups), an **`@handle`**, or a **name** (resolved via user search; if ambiguous, the CLI lists candidates instead of guessing).
229
- - A DM target that doesn't exist yet is **created automatically** (find-or-create).
244
+ - **`<target>`** for `read`/`send` is a **conversation id** (from `chat list` — use this for groups), a **user id**, an **`@handle`**, or a **name**. Names resolve against your **friends first**, then people search; if ambiguous, the CLI lists candidates instead of guessing. A cuid that isn't one of your conversations is retried as a user id, so pasting a user id "just works".
245
+ - `send` to a person you have no DM with yet **creates the DM automatically** (find-or-create, after the confirmation). `read` never creates one — it errors if no DM exists yet.
230
246
  - **Inline media**: `--image <pathOrUrl>` (jpg/png/webp/gif, local ≤10MB or an Amiko URL) and `--audio <pathOrUrl>` (local ≤25MB or an Amiko URL → sent as a voice note). One media block per message (image *or* audio). **Video isn't supported in chat yet.** A local file is uploaded; an Amiko URL (e.g. a generated asset from `amiko create`) attaches directly with no re-upload. (A local *audio* file is sent as a voice note, with your text as a separate message.)
231
247
  - `chat send` messages a real person, so it's **gated on `--yes`** in non-interactive shells. Delivery is real-time. `--raw` prints raw JSON on any subcommand.
232
248
 
249
+ ### Group chats
250
+
251
+ Create and manage group chats **as the owner** via `amiko chat group`:
252
+
253
+ ```bash
254
+ amiko chat group create "Leandro testing" --member Sophie --member Mars --member Matthew --yes
255
+ amiko chat group list # your group chats: title, id, member count, unread
256
+ amiko chat group info "Leandro testing" # members + roles (admins marked); works with the id too
257
+ amiko chat group rename <groupIdOrTitle> "New name" --yes
258
+ amiko chat group add <groupIdOrTitle> --member @sophie --yes
259
+ amiko chat group remove <groupIdOrTitle> --member Mars --yes
260
+ amiko chat group promote <groupIdOrTitle> --member Sophie --yes # make a member an admin
261
+ amiko chat group leave <groupIdOrTitle> --yes # alias: delete — see caveat below
262
+ ```
263
+
264
+ - **`--member`** is repeatable and accepts a plain name, `@handle`, or user id. Plain names resolve against your **friends** first (then people search); an ambiguous name errors listing candidates instead of guessing, and one unresolvable member aborts the whole command **before anything is changed**.
265
+ - **Groups address by id or title** — titles match case-insensitively (exact first, then substring) across your most recent 100 conversations; ambiguous titles error with candidates. `chat send "<group title>" "hi" --yes` also works when exactly one group title matches.
266
+ - **`leave` (alias `delete`) only hides the group for you.** Other members keep the conversation and its history — the platform has no delete-for-everyone. Rename, add, remove-others, and promote are **admin-only** (the creator is admin); the server enforces this.
267
+ - `create`/`add` are outward social actions and `rename`/`remove`/`leave`/`promote` are destructive, so all are **gated on `--yes`** in non-interactive shells. `--raw` prints JSON everywhere.
268
+
233
269
  ## Twin Cards
234
270
 
235
271
  Generate, view, download, and mint your **Twin Card** (template `twins_take`, flavors **work / play / love**).
@@ -253,7 +289,8 @@ amiko card mint <slug> --status # check an existing mint
253
289
  ## Amazon
254
290
 
255
291
  ```bash
256
- amiko markets amazon search "usb c cable" # product search (1 AMIKO)
292
+ amiko markets amazon search "usb c cable" # product search ($0.01)
293
+ amiko markets amazon search "ssd" --token USDT # pay in USDT directly
257
294
  amiko markets amazon quote B01GGKYKQM # price quote (free)
258
295
  ```
259
296
 
@@ -525,6 +562,23 @@ npm publish
525
562
 
526
563
  ## Changelog
527
564
 
565
+ ### 0.14.0-beta.7
566
+
567
+ - **`amiko chat group invite <group>` — share a group's invite/join link + QR.** New read-only subcommand that fetches `GET /api/conversations/{id}/invite` (twin token) and prints the join link plus a scannable QR image URL. Admins-only: SKILL.md instructs the agent to confirm the asker holds `admin`/`owner` (via `amiko chat group info`) before sharing, and the endpoint is admin-gated server-side (403 → admin tip). Fails loudly if the response is missing its link/QR instead of printing a placeholder. Requires the companion amiko-web change (adds `qrUrl` to the invite response + a public `GET /api/conversations/join/[token]/qr` PNG route).
568
+
569
+ ### 0.14.0-beta.6
570
+
571
+ - **`amiko chat send`/`read` accept user ids — DMs no longer require an existing conversation.** Target resolution is rebuilt: a cuid target is verified as a conversation first and, on 404, retried as a user id (user ids and conversation ids are both cuids — previously a user id went straight to the messages route and died with "Conversation not found"). Plain names now resolve **friends-first** (then people search) via the shared `resolveMembers`, with ambiguity reported as a candidate list. Resolution is fully read-only: for `send`, a missing DM is found-or-created only **after** the `--yes`/approval gate (no more empty conversations from an unapproved send), and `read` never creates a DM at all — it errors if none exists. The confirmation summary now shows the **resolved** recipient (`Send to DM with Mars (@mars): …`) so a wrong-person resolution is visible before anything goes out. Unknown cuids are rejected before any conversation is created (the backend accepts dangling participant ids silently), and a 403 on a real conversation no longer falls through to DM creation.
572
+ - **Free outward actions no longer talk about cost.** `requireApproval` gained a `free` mode used by `chat send` and `chat group create/add`: the non-interactive refusal now says the action is free and tells the agent to confirm the action itself — instead of the old "This command will cost no charge… quote the cost to the user", which made twins ask owners to "approve the paid operation, cost 0". SKILL.md's Critical Rule 1 spells out the anti-pattern, documents user-id DM targets ("the owner never needs to start the conversation first"), and drops the false "server enforces friend rules" claim that fed authorization hallucinations.
573
+
574
+ ### 0.14.0-beta.5
575
+
576
+ - **`amiko chat group` — group-chat management as the owner.** New subcommand group under `chat`: `create` (name + repeatable `--member`, one atomic POST), `list`, `info` (members + roles), `rename`, `add`, `remove`, `promote`, and `leave` (alias `delete`). Members resolve friends-first by name (then people search), all-or-nothing before any mutation; groups address by id or case-insensitive title. Uses the existing amiko-web conversation routes (twin token) — rename/add/remove-others/promote are admin-enforced server-side, and `leave|delete` is honest about the platform's semantics: it only hides the group for the caller, there is no delete-for-everyone. `create`/`add` gate on `requireApproval`, the destructive rest on `confirmDestructive` (both exit 2 without `--yes` in non-interactive shells). Plain-name `chat send`/`read` targets now prefer an exact, unambiguous group-title match over people search. Shared conversation types + resolution helpers extracted to `src/lib/conversations.ts`; `convLabel` self-filtering now strips the `did:privy:` prefix so DM labels no longer include the owner. SKILL.md gains a Group chats block + gating-list updates.
577
+
578
+ ### 0.14.0-beta.0
579
+
580
+ - **Direct USDC/USDT payment for MPP marketplace services (Bug #9).** `markets search`, `markets image`, and `markets amazon search` gain `--token <AMIKO|USDC|USDT>`; `markets service call` completes its `--usdc` path and adds `--usdt` (both accept `auto` to price from the endpoint's USD anchor). Stables are pinned at $1.00 — no forced swap to AMIKO and no credits conversion. Requires the matching mpp-service deploy: `charge()`/`chargeAmiko()` now read `X-Payment-Token` and verify the on-chain transfer against that token's mint (`verifySplTransfer`), with a ±0.5% tolerance for stables (±5% stays for AMIKO spot drift). Also fixes stale hardcoded amounts: `markets search` / `amazon search` paid a flat "1 AMIKO" regardless of spot — under current prices that under-pays the $0.01 anchor and fails verification; amounts are now quoted live before the approval gate, which shows the real cost instead of "1 AMIKO". Shared payment plumbing extracted to `src/lib/treasury-payment.ts` (one TREASURY constant, one transfer path).
581
+
528
582
  ### 0.11.0-beta.3
529
583
 
530
584
  - **`amiko composio` removed (breaking).** The Composio OAuth-connection commands (`composio connect`, `composio disconnect`) are gone — `src/commands/composio.ts` deleted, `composio` command group dropped from `src/index.ts`. SKILL.md frontmatter, command-groups list, `--yes`-gated list, and the dedicated `## Composio` block are all removed; README's lead paragraph, architecture tree, destructive-ops list, Platform-table row, and Composio code-block example are updated to match. Scripts that called `amiko composio ...` will now error with "unknown command".