@heyamiko/amiko-cli 0.17.2 β 0.19.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 +119 -3
- package/dist/index.js +2184 -3461
- package/package.json +1 -1
- package/skills/SKILL.md +22 -3
package/README.md
CHANGED
|
@@ -314,6 +314,10 @@ amiko chat send @sophie "made this π΅" --audio <generated-url> --yes # attach
|
|
|
314
314
|
amiko chat send @sophie --gif "happy dance" --yes # send the top Klipy GIF for a search (message optional)
|
|
315
315
|
amiko chat gifs "happy dance" # browse GIFs first, then send a specific one:
|
|
316
316
|
amiko chat send @sophie "we did it!" --gif <gifUrl> --yes # attach an exact GIF by its Klipy URL
|
|
317
|
+
amiko chat library --kind image # your Library (Create Studio creations) with refs
|
|
318
|
+
amiko chat explore --search sunset # public Explore media with refs
|
|
319
|
+
amiko chat send @sophie "for review" --attach drive:<docId> --attach library:<id> --yes # attach files you already have
|
|
320
|
+
amiko chat send @sophie --attach explore:post:<postId>:0 --yes # message optional with --attach
|
|
317
321
|
amiko chat receipts <messageId> # who read your message + when (id from `chat read`)
|
|
318
322
|
amiko chat pin <messageId> --yes # pin for everyone (id from `chat read`; groups: admins only)
|
|
319
323
|
amiko chat unpin <messageId> --yes # remove a pin for everyone
|
|
@@ -324,7 +328,12 @@ amiko chat mark-read --all --yes # mark EVERY conversation as re
|
|
|
324
328
|
- **`<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".
|
|
325
329
|
- `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.
|
|
326
330
|
- **Unread mentions & replies**: rows whose unread messages **concern you directly** get an `@you` marker next to the unread count, and `chat list --mentions` filters to just those. The flag is server-computed over your unread messages and covers three cases: a direct **@mention** of you, a permitted **@all** in a group, and a **reply to one of your messages**. Composes with `--limit`/`--archived`/`--raw` (the raw payload is filtered too). Requires the amiko-web `has_unread_mention` deploy. On an older server the field is absent and reads as **false for every conversation**: plain `chat list` still shows unread counts, just without `@you`, and `chat list --mentions` returns no matches.
|
|
327
|
-
- **Inline media**: `--image <pathOrUrl>` (jpg/png/webp/gif, local β€10MB or an Amiko URL), `--audio <pathOrUrl>` (local β€25MB or an Amiko URL β sent as a voice note), and `--gif <queryOrUrl>` (search words send the **top Klipy result**; or pass an exact Klipy URL from `amiko chat gifs` β non-Klipy URLs are refused; to send another image, use `--image` with a local file or an Amiko URL). One
|
|
331
|
+
- **Inline media**: `--image <pathOrUrl>` (jpg/png/webp/gif, local β€10MB or an Amiko URL), `--audio <pathOrUrl>` (local β€25MB or an Amiko URL β sent as a voice note), and `--gif <queryOrUrl>` (search words send the **top Klipy result**; or pass an exact Klipy URL from `amiko chat gifs` β non-Klipy URLs are refused; to send another image, use `--image` with a local file or an Amiko URL). One of those per message (image *or* audio *or* gif) β `--image` can also be combined with `--attach` below. **Local video files aren't supported in chat yet** (Library/Explore videos are, via `--attach`). 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.)
|
|
332
|
+
- **Attach from Drive, Library or Explore**: `--attach <ref>` (repeatable, up to 6 per message including `--image`) sends files you already have on Amiko β the same sources as the web composer's "Add from Drive" and "Add from Library or Explore". Nothing is re-uploaded.
|
|
333
|
+
- `drive:<docId>` β an **image or document** (pdf, docx, β¦, β€25MB) from your Drive; ids from `amiko drive list --json` / `drive search`. Audio/video Drive files are refused. Sent as a file attachment that keeps its Drive `doc_id`.
|
|
334
|
+
- `library:<id>` β one of your Create Studio creations (image, video or audio); refs from `amiko chat library` (`--kind`, `--search`, `--limit`, `--cursor`, `--raw`).
|
|
335
|
+
- `explore:post:<postId>:<n>` β media from a public post on Explore; refs from `amiko chat explore` (same flags, minus `--twin`).
|
|
336
|
+
- Drive and Library use your current twin; `--twin <id>` picks another. The message text is optional with `--attach` (recipients see an "Image"/"Video"/"Audio"/"File" label). Library/Explore refs are checked before the confirmation; Drive files are validated and signed only after you approve, so a declined send leaves nothing behind. `--attach` can't be combined with `--audio` or `--gif`.
|
|
328
337
|
- **GIFs**: `amiko chat gifs [query]` lists Klipy GIFs (trending with no query; `--page`/`--limit`/`--raw`) β read-only and ungated, powered by KLIPY. The message text is optional with `--gif` (a captionless GIF sends as just the GIF); a caption renders under the GIF on every client.
|
|
329
338
|
- **@all in groups**: `--all` prepends an @all mention, and a standalone `@all` word typed in the message converts too β either way **every member** is notified. Group **admins/owners** can always use it; everyone else only after an admin runs `amiko chat group mention-all <group> on`. Without permission, `--all` fails with the fix named, while a typed `@all` is delivered as plain text (with a note). Incoming mention markup renders as plain `@name`/`@all` in `chat read` and `chat list`.
|
|
330
339
|
- `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.
|
|
@@ -371,6 +380,29 @@ amiko chat lists delete "Focus" --yes # the conversations themselves
|
|
|
371
380
|
- The server stores a list as a plain conversation-id array and `PATCH` replaces it wholesale, so `add`/`remove` read-modify-write the full array β existing entries always survive an `add`, and one unresolvable `--conversation` aborts the whole command before anything is written.
|
|
372
381
|
- Lists are private, but mutations still take the `--yes` gate in non-interactive shells (they reshape your chat sidebar on every device). The bare listing is an ungated read; `--raw` prints JSON everywhere.
|
|
373
382
|
|
|
383
|
+
### Polls
|
|
384
|
+
|
|
385
|
+
Create and answer **chat polls** as the owner via `amiko chat poll` β the same polls as the app's chat (single or multiple answers, anonymous voting, quizzes).
|
|
386
|
+
|
|
387
|
+
```bash
|
|
388
|
+
amiko chat poll create "Trip planning" "Where to?" --option Beach --option Mountains --option City --yes
|
|
389
|
+
amiko chat poll create @sophie "Lunch?" --option Tacos --option Sushi --multiple --anonymous --yes
|
|
390
|
+
amiko chat poll create "Trip planning" "Capital of France?" --option Lyon --option Paris --quiz --correct 2 --explanation "Since 987" --yes
|
|
391
|
+
amiko chat poll show <messageId> # options, tallies, voters, your vote (id from `chat read`)
|
|
392
|
+
amiko chat poll vote <messageId> 2 --yes # by option numberβ¦
|
|
393
|
+
amiko chat poll vote <messageId> Beach City --yes # β¦or text / option id; multi-answer polls take several
|
|
394
|
+
amiko chat poll retract <messageId> --yes # take your vote back
|
|
395
|
+
amiko chat poll close <messageId> --yes # end your poll β permanent
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
- A poll is a chat message: `chat read` shows it as `π <question>` followed by its options, tallies and a `β` on your own choices, and its message **id** is what `show`/`vote`/`retract`/`close` take.
|
|
399
|
+
- **`vote` sets your answer to exactly the choices given**, replacing any earlier vote (like tapping in the app). A single-answer poll takes one choice. Choices are the option's number (as `show` prints it), its text (case-insensitive), or its id.
|
|
400
|
+
- **Quizzes** have one correct answer (`--correct <n>`, 1-based). Results and the answer stay hidden until you answer, a quiz answer is final (no changing or retracting it), and you can't answer your own quiz. `--explanation` shows with the answer once it's revealed.
|
|
401
|
+
- **Anonymous** polls show counts only β nobody (the creator included) sees who voted for what. Otherwise `show` lists voter names.
|
|
402
|
+
- Only the poll's **creator** can `close` it. Closing is permanent: votes stop, results stay, and a quiz's answer is revealed to everyone.
|
|
403
|
+
- Polls work in **DMs and group chats with at least two people** β not in channels, support chats, or your chat with your twin. Limits: question β€300 chars, 2β12 unique options β€100 chars each, explanation β€200 chars (checked before anything is sent).
|
|
404
|
+
- `create`, `vote` and `retract` are outward (the chat sees them) and `close` is irreversible, so all are **gated on `--yes`** in non-interactive shells. `show` is an ungated read; `--raw` prints JSON everywhere.
|
|
405
|
+
|
|
374
406
|
## Twin Cards
|
|
375
407
|
|
|
376
408
|
Generate, view, download, and mint your **Twin Card** (template `twins_take`, flavors **work / play / love**).
|
|
@@ -975,7 +1007,7 @@ Your conversations (DMs + group chats) as the owner β list, read, send, manage
|
|
|
975
1007
|
|---|---|
|
|
976
1008
|
| `chat list` | List your conversations (DMs and group chats) |
|
|
977
1009
|
| `chat read` | Read recent messages in a conversation (conversation id, user id, @handle, or name) |
|
|
978
|
-
| `chat send` | Send a message as yourself (the owner) to a conversation or person (conversation id, user id, @handle, or name β DMs are opened automatically). The message is optional only with --gif. |
|
|
1010
|
+
| `chat send` | Send a message as yourself (the owner) to a conversation or person (conversation id, user id, @handle, or name β DMs are opened automatically). The message is optional only with --gif or --attach. |
|
|
979
1011
|
| `chat react` | React to a message as yourself (the owner). Get the message id from `amiko chat read`. One reaction per message β a new emoji replaces your previous one. |
|
|
980
1012
|
| `chat unreact` | Remove your (the owner's) reaction from a message. Get the message id from `amiko chat read`. |
|
|
981
1013
|
| `chat reactions` | Show the reactions on a message. Get the message id from `amiko chat read`. |
|
|
@@ -985,8 +1017,11 @@ Your conversations (DMs + group chats) as the owner β list, read, send, manage
|
|
|
985
1017
|
| `chat pinned` | List a conversation's pinned messages, oldest first (conversation id, user id, @handle, or name) |
|
|
986
1018
|
| `chat mark-read` | Mark ALL conversations as read (requires --all). Clears every unread badge on the owner's devices; senders see read ticks. |
|
|
987
1019
|
| `chat gifs` | Search Klipy GIFs (trending when no query) β pass a result URL to `amiko chat send --gif` |
|
|
1020
|
+
| `chat library` | List your Library (Create Studio creations) β pass a ref to `amiko chat send --attach` |
|
|
1021
|
+
| `chat explore` | List recent public media from Explore β pass a ref to `amiko chat send --attach` |
|
|
988
1022
|
| `chat group` | Group chats β create, list, info, rename, add/remove members, @all permission, leave |
|
|
989
1023
|
| `chat lists` | Your chat lists (private folders of conversations) β run bare to see them; create, rename, add/remove conversations, delete |
|
|
1024
|
+
| `chat poll` | Chat polls β create, show, vote, retract your vote, close (as the owner) |
|
|
990
1025
|
|
|
991
1026
|
#### `amiko chat list`
|
|
992
1027
|
|
|
@@ -1010,13 +1045,15 @@ Read recent messages in a conversation (conversation id, user id, @handle, or na
|
|
|
1010
1045
|
|
|
1011
1046
|
#### `amiko chat send <target> [message]`
|
|
1012
1047
|
|
|
1013
|
-
Send a message as yourself (the owner) to a conversation or person (conversation id, user id, @handle, or name β DMs are opened automatically). The message is optional only with --gif.
|
|
1048
|
+
Send a message as yourself (the owner) to a conversation or person (conversation id, user id, @handle, or name β DMs are opened automatically). The message is optional only with --gif or --attach.
|
|
1014
1049
|
|
|
1015
1050
|
| Flag | Default | Description |
|
|
1016
1051
|
|---|---|---|
|
|
1017
1052
|
| `--image <pathOrUrl>` | | Attach an image: local file (jpg/png/webp/gif, β€10MB) or an Amiko URL (e.g. from `amiko create`) |
|
|
1018
1053
|
| `--audio <pathOrUrl>` | | Attach audio as a voice note: local file (β€25MB) or an Amiko URL |
|
|
1019
1054
|
| `--gif <queryOrUrl>` | | Attach a GIF: search words (sends the top Klipy result) or a Klipy URL from `amiko chat gifs` |
|
|
1055
|
+
| `--attach <ref>` | | Attach a file you already have on Amiko (repeatable, up to 6): drive:<docId> (image or document from `amiko drive list`), library:<id> (from `amiko chat library`), explore:post:<postId>:<n> (from `amiko chat explore`). Combines with --image. |
|
|
1056
|
+
| `--twin <id>` | | Twin whose Drive/Library --attach reads (default: your current twin) |
|
|
1020
1057
|
| `--all` | | Mention @all β notifies every member of the group (admins/owners always; others only when enabled via `amiko chat group mention-all`) |
|
|
1021
1058
|
| `--yes` | | Skip the confirmation (required in non-interactive shells) |
|
|
1022
1059
|
| `--raw` | | Output raw JSON |
|
|
@@ -1101,6 +1138,31 @@ Search Klipy GIFs (trending when no query) β pass a result URL to `amiko chat
|
|
|
1101
1138
|
| `--limit <n>` | `10` | Max results shown (1-24) |
|
|
1102
1139
|
| `--raw` | | Output raw JSON |
|
|
1103
1140
|
|
|
1141
|
+
#### `amiko chat library`
|
|
1142
|
+
|
|
1143
|
+
List your Library (Create Studio creations) β pass a ref to `amiko chat send --attach`
|
|
1144
|
+
|
|
1145
|
+
| Flag | Default | Description |
|
|
1146
|
+
|---|---|---|
|
|
1147
|
+
| `--twin <id>` | | Twin whose Library to list (default: current twin) |
|
|
1148
|
+
| `--kind <kind>` | | Only image, video, or audio |
|
|
1149
|
+
| `--search <text>` | | Filter by prompt text |
|
|
1150
|
+
| `--limit <n>` | `20` | Items to fetch (1-50) |
|
|
1151
|
+
| `--cursor <cursor>` | | Continue from a previous page |
|
|
1152
|
+
| `--raw` | | Output raw JSON |
|
|
1153
|
+
|
|
1154
|
+
#### `amiko chat explore`
|
|
1155
|
+
|
|
1156
|
+
List recent public media from Explore β pass a ref to `amiko chat send --attach`
|
|
1157
|
+
|
|
1158
|
+
| Flag | Default | Description |
|
|
1159
|
+
|---|---|---|
|
|
1160
|
+
| `--kind <kind>` | | Only image, video, or audio |
|
|
1161
|
+
| `--search <text>` | | Filter by title |
|
|
1162
|
+
| `--limit <n>` | `20` | Posts to fetch (1-96) |
|
|
1163
|
+
| `--cursor <cursor>` | | Continue from a previous page |
|
|
1164
|
+
| `--raw` | | Output raw JSON |
|
|
1165
|
+
|
|
1104
1166
|
#### `amiko chat group`
|
|
1105
1167
|
|
|
1106
1168
|
Group chats β create, list, info, rename, add/remove members, @all permission, leave
|
|
@@ -1249,6 +1311,60 @@ Delete a chat list (the conversations in it are untouched)
|
|
|
1249
1311
|
| `--yes` | | Skip the confirmation (required in non-interactive shells) |
|
|
1250
1312
|
| `--raw` | | Output raw JSON |
|
|
1251
1313
|
|
|
1314
|
+
#### `amiko chat poll`
|
|
1315
|
+
|
|
1316
|
+
Chat polls β create, show, vote, retract your vote, close (as the owner)
|
|
1317
|
+
|
|
1318
|
+
##### `amiko chat poll create <target> <question>`
|
|
1319
|
+
|
|
1320
|
+
Post a poll as yourself (the owner) to a DM or group chat (conversation id, user id, @handle, or name β DMs are opened automatically). Pass 2-12 answers with --option.
|
|
1321
|
+
|
|
1322
|
+
| Flag | Default | Description |
|
|
1323
|
+
|---|---|---|
|
|
1324
|
+
| `--option <text>` | | An answer option β repeat for each (2-12, in order, unique) |
|
|
1325
|
+
| `--multiple` | | Let people pick more than one answer |
|
|
1326
|
+
| `--anonymous` | | Hide who voted for what (everyone sees counts only) |
|
|
1327
|
+
| `--quiz` | | Quiz mode: one correct answer, revealed to each person once they answer |
|
|
1328
|
+
| `--correct <n>` | | Quiz only: the number of the correct option (1-based) |
|
|
1329
|
+
| `--explanation <text>` | | Quiz only: shown with the answer once it's revealed (β€200 characters) |
|
|
1330
|
+
| `--yes` | | Skip the confirmation (required in non-interactive shells) |
|
|
1331
|
+
| `--raw` | | Output raw JSON |
|
|
1332
|
+
|
|
1333
|
+
##### `amiko chat poll show <messageId>`
|
|
1334
|
+
|
|
1335
|
+
Show a poll's options, results, voters and your own vote (the poll's message id, from `amiko chat read`)
|
|
1336
|
+
|
|
1337
|
+
| Flag | Default | Description |
|
|
1338
|
+
|---|---|---|
|
|
1339
|
+
| `--raw` | | Output raw JSON |
|
|
1340
|
+
|
|
1341
|
+
##### `amiko chat poll vote <messageId> <choices>`
|
|
1342
|
+
|
|
1343
|
+
Vote as yourself (the owner). Sets your answer to exactly these options β each by number (as in `chat poll show`), text, or option id β replacing any earlier vote.
|
|
1344
|
+
|
|
1345
|
+
| Flag | Default | Description |
|
|
1346
|
+
|---|---|---|
|
|
1347
|
+
| `--yes` | | Skip the confirmation (required in non-interactive shells) |
|
|
1348
|
+
| `--raw` | | Output raw JSON |
|
|
1349
|
+
|
|
1350
|
+
##### `amiko chat poll retract <messageId>`
|
|
1351
|
+
|
|
1352
|
+
Take back your vote on a poll (quiz answers can't be retracted)
|
|
1353
|
+
|
|
1354
|
+
| Flag | Default | Description |
|
|
1355
|
+
|---|---|---|
|
|
1356
|
+
| `--yes` | | Skip the confirmation (required in non-interactive shells) |
|
|
1357
|
+
| `--raw` | | Output raw JSON |
|
|
1358
|
+
|
|
1359
|
+
##### `amiko chat poll close <messageId>`
|
|
1360
|
+
|
|
1361
|
+
End a poll you created β no one can vote afterwards and it can't be reopened
|
|
1362
|
+
|
|
1363
|
+
| Flag | Default | Description |
|
|
1364
|
+
|---|---|---|
|
|
1365
|
+
| `--yes` | | Skip the confirmation (required in non-interactive shells) |
|
|
1366
|
+
| `--raw` | | Output raw JSON |
|
|
1367
|
+
|
|
1252
1368
|
### `amiko card`
|
|
1253
1369
|
|
|
1254
1370
|
Twin Cards (work/play/love) β generate, view, download, mint
|