Skip to content

Commit 534abc4

Browse files
committed
feat(thread): add reversible inbox-state commands
1 parent 5f601fc commit 534abc4

14 files changed

Lines changed: 955 additions & 38 deletions

File tree

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,11 @@ tw inbox --unread # unread threads only
103103
tw thread view <ref> # view thread with comments
104104
tw thread view <ref> --comment 123 # view a specific comment
105105
tw thread reply <ref> # reply to a thread
106+
tw thread done <ref> # mark a thread done
107+
tw thread reopen <ref> # undo thread done / reopen inbox state
108+
tw thread mark-unread <ref> # mark a thread unread again
109+
tw thread mark-read <ref> # explicitly mark a thread read
110+
tw thread restore <ref> --unread # reopen and return it to unread inbox
106111
tw conversation unread # list unread conversations
107112
tw conversation view <ref> # view conversation messages
108113
tw msg view <ref> # view a conversation message
@@ -115,6 +120,16 @@ tw away clear # clear away status
115120

116121
References accept IDs (`123` or `id:123`), Twist URLs, or fuzzy names (for workspaces/users).
117122

123+
Thread inbox state changes support `--dry-run`, `--json`, bulk refs, and `--from-file`:
124+
125+
```bash
126+
tw thread reopen 12345 67890 --yes
127+
tw thread mark-unread --from-file ids.txt --dry-run
128+
tw thread restore 12345 --unread --json
129+
```
130+
131+
Migration note: `tw thread done` is now reversible via `tw thread reopen`.
132+
118133
Run `tw --help` or `tw <command> --help` for more options.
119134

120135
## Shell Completions

skills/twist-cli/SKILL.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,16 @@ tw thread reply <ref> "content" --close # Reply and close the thread
7777
tw thread reply <ref> "content" --reopen # Reply and reopen a closed thread
7878
tw thread done <ref> # Archive thread (mark done)
7979
tw thread done <ref> --json # Archive and return status as JSON
80+
tw thread done <ref> <ref> --yes # Archive multiple threads after confirmation
81+
tw thread done --from-file ids.txt --dry-run # Preview bulk archive from file
82+
tw thread reopen <ref> # Reopen a done thread
83+
tw thread reopen <ref> --json # Return before/after inbox state as JSON
84+
tw thread reopen <ref> <ref> --yes # Reopen multiple threads
85+
tw thread mark-unread <ref> # Mark a thread unread again
86+
tw thread mark-unread --from-file ids.txt --yes # Bulk mark unread from file
87+
tw thread mark-read <ref> # Explicitly mark a thread read
88+
tw thread restore <ref> # Restore a thread to the inbox
89+
tw thread restore <ref> --unread # Restore and mark unread in one step
8090
tw thread mute <ref> # Mute thread for 60 minutes (default)
8191
tw thread mute <ref> --minutes 480 # Mute for custom duration
8292
tw thread mute <ref> --json # Mute and return { id, mutedUntil } as JSON
@@ -92,6 +102,8 @@ Default `--notify` for reply is EVERYONE_IN_THREAD, which may notify more people
92102

93103
`--notify` automatically resolves IDs: group IDs are routed to the `groups` API field, user IDs to `recipients`. No special syntax needed.
94104

105+
Migration note: `tw thread done` is reversible via `tw thread reopen`.
106+
95107
## Thread Comments
96108

97109
```bash

0 commit comments

Comments
 (0)