@heyamiko/amiko-cli 0.17.2 → 0.18.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 +78 -0
- package/dist/index.js +1738 -3453
- package/package.json +1 -1
- package/skills/SKILL.md +16 -2
package/README.md
CHANGED
|
@@ -371,6 +371,29 @@ amiko chat lists delete "Focus" --yes # the conversations themselves
|
|
|
371
371
|
- 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
372
|
- 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
373
|
|
|
374
|
+
### Polls
|
|
375
|
+
|
|
376
|
+
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).
|
|
377
|
+
|
|
378
|
+
```bash
|
|
379
|
+
amiko chat poll create "Trip planning" "Where to?" --option Beach --option Mountains --option City --yes
|
|
380
|
+
amiko chat poll create @sophie "Lunch?" --option Tacos --option Sushi --multiple --anonymous --yes
|
|
381
|
+
amiko chat poll create "Trip planning" "Capital of France?" --option Lyon --option Paris --quiz --correct 2 --explanation "Since 987" --yes
|
|
382
|
+
amiko chat poll show <messageId> # options, tallies, voters, your vote (id from `chat read`)
|
|
383
|
+
amiko chat poll vote <messageId> 2 --yes # by option number…
|
|
384
|
+
amiko chat poll vote <messageId> Beach City --yes # …or text / option id; multi-answer polls take several
|
|
385
|
+
amiko chat poll retract <messageId> --yes # take your vote back
|
|
386
|
+
amiko chat poll close <messageId> --yes # end your poll — permanent
|
|
387
|
+
```
|
|
388
|
+
|
|
389
|
+
- 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.
|
|
390
|
+
- **`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.
|
|
391
|
+
- **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.
|
|
392
|
+
- **Anonymous** polls show counts only — nobody (the creator included) sees who voted for what. Otherwise `show` lists voter names.
|
|
393
|
+
- Only the poll's **creator** can `close` it. Closing is permanent: votes stop, results stay, and a quiz's answer is revealed to everyone.
|
|
394
|
+
- 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).
|
|
395
|
+
- `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.
|
|
396
|
+
|
|
374
397
|
## Twin Cards
|
|
375
398
|
|
|
376
399
|
Generate, view, download, and mint your **Twin Card** (template `twins_take`, flavors **work / play / love**).
|
|
@@ -987,6 +1010,7 @@ Your conversations (DMs + group chats) as the owner — list, read, send, manage
|
|
|
987
1010
|
| `chat gifs` | Search Klipy GIFs (trending when no query) — pass a result URL to `amiko chat send --gif` |
|
|
988
1011
|
| `chat group` | Group chats — create, list, info, rename, add/remove members, @all permission, leave |
|
|
989
1012
|
| `chat lists` | Your chat lists (private folders of conversations) — run bare to see them; create, rename, add/remove conversations, delete |
|
|
1013
|
+
| `chat poll` | Chat polls — create, show, vote, retract your vote, close (as the owner) |
|
|
990
1014
|
|
|
991
1015
|
#### `amiko chat list`
|
|
992
1016
|
|
|
@@ -1249,6 +1273,60 @@ Delete a chat list (the conversations in it are untouched)
|
|
|
1249
1273
|
| `--yes` | | Skip the confirmation (required in non-interactive shells) |
|
|
1250
1274
|
| `--raw` | | Output raw JSON |
|
|
1251
1275
|
|
|
1276
|
+
#### `amiko chat poll`
|
|
1277
|
+
|
|
1278
|
+
Chat polls — create, show, vote, retract your vote, close (as the owner)
|
|
1279
|
+
|
|
1280
|
+
##### `amiko chat poll create <target> <question>`
|
|
1281
|
+
|
|
1282
|
+
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.
|
|
1283
|
+
|
|
1284
|
+
| Flag | Default | Description |
|
|
1285
|
+
|---|---|---|
|
|
1286
|
+
| `--option <text>` | | An answer option — repeat for each (2-12, in order, unique) |
|
|
1287
|
+
| `--multiple` | | Let people pick more than one answer |
|
|
1288
|
+
| `--anonymous` | | Hide who voted for what (everyone sees counts only) |
|
|
1289
|
+
| `--quiz` | | Quiz mode: one correct answer, revealed to each person once they answer |
|
|
1290
|
+
| `--correct <n>` | | Quiz only: the number of the correct option (1-based) |
|
|
1291
|
+
| `--explanation <text>` | | Quiz only: shown with the answer once it's revealed (≤200 characters) |
|
|
1292
|
+
| `--yes` | | Skip the confirmation (required in non-interactive shells) |
|
|
1293
|
+
| `--raw` | | Output raw JSON |
|
|
1294
|
+
|
|
1295
|
+
##### `amiko chat poll show <messageId>`
|
|
1296
|
+
|
|
1297
|
+
Show a poll's options, results, voters and your own vote (the poll's message id, from `amiko chat read`)
|
|
1298
|
+
|
|
1299
|
+
| Flag | Default | Description |
|
|
1300
|
+
|---|---|---|
|
|
1301
|
+
| `--raw` | | Output raw JSON |
|
|
1302
|
+
|
|
1303
|
+
##### `amiko chat poll vote <messageId> <choices>`
|
|
1304
|
+
|
|
1305
|
+
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.
|
|
1306
|
+
|
|
1307
|
+
| Flag | Default | Description |
|
|
1308
|
+
|---|---|---|
|
|
1309
|
+
| `--yes` | | Skip the confirmation (required in non-interactive shells) |
|
|
1310
|
+
| `--raw` | | Output raw JSON |
|
|
1311
|
+
|
|
1312
|
+
##### `amiko chat poll retract <messageId>`
|
|
1313
|
+
|
|
1314
|
+
Take back your vote on a poll (quiz answers can't be retracted)
|
|
1315
|
+
|
|
1316
|
+
| Flag | Default | Description |
|
|
1317
|
+
|---|---|---|
|
|
1318
|
+
| `--yes` | | Skip the confirmation (required in non-interactive shells) |
|
|
1319
|
+
| `--raw` | | Output raw JSON |
|
|
1320
|
+
|
|
1321
|
+
##### `amiko chat poll close <messageId>`
|
|
1322
|
+
|
|
1323
|
+
End a poll you created — no one can vote afterwards and it can't be reopened
|
|
1324
|
+
|
|
1325
|
+
| Flag | Default | Description |
|
|
1326
|
+
|---|---|---|
|
|
1327
|
+
| `--yes` | | Skip the confirmation (required in non-interactive shells) |
|
|
1328
|
+
| `--raw` | | Output raw JSON |
|
|
1329
|
+
|
|
1252
1330
|
### `amiko card`
|
|
1253
1331
|
|
|
1254
1332
|
Twin Cards (work/play/love) — generate, view, download, mint
|