Downloading Threads¶
The thread-download command fetches a thread from the Fediverse and exports it to stdout or a file.
Provide any status in the thread — the command walks to the root and collects all replies by the original author.
taibai thread-download https://mastodon.social/@user/109031952222346765
taibai thread-download 109031952222346765 --format markdown -o thread.md
Author filtering¶
Only posts by the author of the root status are included. Replies from other participants are excluded. This gives you a clean export of a single author's thread, rather than the entire conversation.
Formats¶
Three output formats are available via --format / -f:
thread (default)¶
Produces a file in the taibai thread format — the same format read by taibai thread.
This enables a round-trip: download a thread, edit it, and re-post it to a different instance.
taibai thread-download 109031952222346765 > draft.md
# edit draft.md as needed
taibai thread draft.md --dry-run
taibai thread draft.md
Example output:
---
visibility: public
---
Opening post of the thread.
---
visibility: unlisted
Second post — different visibility gets a per-post override.
---
Third post — inherits global visibility (public).
Global visibility and content-warning are taken from the root post.
Per-post overrides appear only when a reply differs from those globals.
A reply that clears a global CW emits cw: (empty value) to cancel it.
json¶
Pretty-printed JSON array of status objects, using the same model_dump(exclude_none=True) serialisation as --json on other commands.
markdown¶
A Markdown document with a header line and one section per post:
# Thread by @user@mastodon.social — 2026-04-25
---
*2026-04-25 14:30 · public*
Opening post of the thread.
---
*2026-04-25 14:31 · unlisted*
Second post.
Use --output / -o to write to a file:
Options reference¶
| Option | Short | Default | Description |
|---|---|---|---|
STATUS_URL_OR_ID |
— | — | URL or numeric ID of any status in the thread |
--format |
-f |
thread |
Output format: thread, json, or markdown |
--output |
-o |
— | Write to this file instead of stdout |
--profile |
-p |
default |
Profile name (TAIBAI_PROFILE env var) |