Skip to content

Commit c371740

Browse files
committed
Merge branch 'feat/dm-support-v2' into main
Add bsky dm command group with 8 subcommands (list, read, send, delete, mute, unmute, accept, mark-read) and fix binary release pipeline to use yarn build with bun compile.
2 parents 7cf6cea + 2a8a6ef commit c371740

9 files changed

Lines changed: 830 additions & 6 deletions

File tree

.github/workflows/release.yml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,27 @@ jobs:
6666
steps:
6767
- uses: actions/checkout@v4
6868

69-
# Use Bun for both build and binary compilation
70-
# (Yarn 4 PnP zips cause esbuild resolution failures on Windows)
71-
- uses: oven-sh/setup-bun@v2
69+
# Build dist/index.js with tsup (resolves @/ path aliases)
70+
- uses: actions/setup-node@v6
71+
with:
72+
node-version: 22
7273

73-
- run: bun install
74+
- run: corepack enable
7475

75-
# Build dist/index.js with tsup via bun (real node_modules/)
76-
- run: bun run build
76+
- run: yarn install
77+
78+
# Unplug rrule + tslib so esbuild can read them from disk
79+
# (PnP zip archives cause esbuild resolution failures on Windows)
80+
- run: yarn unplug rrule tslib
81+
82+
- run: yarn build
7783

7884
# Compile standalone binary from the tsup output
85+
- uses: oven-sh/setup-bun@v2
86+
87+
# Bun needs a standard node_modules/ for cross-compilation
88+
- run: bun install
89+
7990
- name: Compile binary
8091
run: bun build --compile --target ${{ matrix.target }} dist/index.js --outfile bsky
8192

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,19 @@ bsky bookmarks delete <uri...>
206206
bsky bookmarks get [-n count]
207207
```
208208

209+
### Direct Messages
210+
211+
```
212+
bsky dm list [-n count] [--unread] [--requests]
213+
bsky dm read <handle-or-convo-id> [-n count]
214+
bsky dm send <handle> <text...> [--stdin]
215+
bsky dm delete <convo-id> <message-id>
216+
bsky dm mute <convo-id>
217+
bsky dm unmute <convo-id>
218+
bsky dm accept <convo-id>
219+
bsky dm mark-read [convo-id] [--all]
220+
```
221+
209222
### Social
210223

211224
```
@@ -308,6 +321,7 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for the full contributor guide.
308321
- [x] Drafts with offline sync and partial failure recovery
309322
- [x] Secure credential storage (OS keychain + session tokens, no plaintext passwords)
310323
- [x] Scheduled and recurring posts with cross-platform automation
324+
- [x] Direct messages (list, read, send, mute, accept requests)
311325
- [ ] List creation and management
312326
- [ ] Starter packs
313327
- [ ] Moderation lists

docs/commands.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,91 @@ bsky bookmarks get
387387
bsky bookmarks get -n 20
388388
```
389389

390+
## Direct Messages
391+
392+
### `bsky dm list`
393+
394+
List conversations.
395+
396+
```bash
397+
bsky dm list
398+
bsky dm list -n 10
399+
bsky dm list --unread
400+
bsky dm list --requests
401+
bsky dm list --json
402+
```
403+
404+
| Option | Description |
405+
|--------|-------------|
406+
| `-n, --count <number>` | Number of conversations (default: 50) |
407+
| `--unread` | Only show unread conversations |
408+
| `--requests` | Show conversation requests |
409+
410+
### `bsky dm read`
411+
412+
Read messages in a conversation. Accepts a handle or conversation ID.
413+
414+
```bash
415+
bsky dm read alice.bsky.social
416+
bsky dm read alice.bsky.social -n 10
417+
bsky dm read convo123 --json
418+
```
419+
420+
| Option | Description |
421+
|--------|-------------|
422+
| `-n, --count <number>` | Number of messages (default: 30) |
423+
424+
### `bsky dm send`
425+
426+
Send a direct message.
427+
428+
```bash
429+
bsky dm send alice.bsky.social "Hello!"
430+
echo "Hello!" | bsky dm send alice.bsky.social --stdin
431+
```
432+
433+
| Option | Description |
434+
|--------|-------------|
435+
| `--stdin` | Read message text from stdin |
436+
437+
### `bsky dm delete`
438+
439+
Delete a message (for yourself only).
440+
441+
```bash
442+
bsky dm delete convo123 msg001
443+
```
444+
445+
### `bsky dm mute` / `bsky dm unmute`
446+
447+
Mute or unmute a conversation.
448+
449+
```bash
450+
bsky dm mute convo123
451+
bsky dm unmute convo123
452+
```
453+
454+
### `bsky dm accept`
455+
456+
Accept a conversation request.
457+
458+
```bash
459+
bsky dm accept convo123
460+
```
461+
462+
### `bsky dm mark-read`
463+
464+
Mark conversation(s) as read.
465+
466+
```bash
467+
bsky dm mark-read convo123
468+
bsky dm mark-read --all
469+
```
470+
471+
| Option | Description |
472+
|--------|-------------|
473+
| `--all` | Mark all conversations as read |
474+
390475
## Social
391476

392477
### `bsky follow` / `bsky unfollow`

docs/configuration.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,12 @@ Below is the complete config file with all available options and their defaults.
143143
[bookmarks.get]
144144
# count = 50
145145

146+
[dm.list]
147+
# count = 50
148+
149+
[dm.read]
150+
# count = 30
151+
146152
[schedule.list]
147153
# count = 5
148154
# order = "asc"

0 commit comments

Comments
 (0)