Skip to content

Posting Threads

The thread command posts a multi-part thread from a single text file. Each section in the file becomes one status, with each reply automatically chained to the previous one.

taibai thread my-announcement.thread

File format

A thread file has two parts: an optional frontmatter block and one or more post sections separated by ---.

---
visibility: unlisted
cw: My long thread
---

visibility: public
This is the first post — it will be public even though the global default is unlisted.

---

This is the second post. It inherits the global visibility (unlisted) and the global cw.

---

cw: different warning
Third post — same visibility as the global default, but a different content warning.

Frontmatter

The frontmatter block is optional. It must start and end with a line containing only ---.

Key Default Description
visibility public Default visibility for all posts in the thread
cw Default content warning applied to all posts

Posts

Posts are separated by a line containing only ---. Blank lines around --- are ignored.

Each post may begin with one or more key: value lines that override the global frontmatter values for that post only. The same keys are allowed: visibility and cw. Metadata parsing stops at the first blank line or any non-metadata line.

An empty post section (nothing between two --- separators, or before the first one) is an error.


Visibility

The most common threading pattern on Mastodon is to post the opening status as public and all replies as unlisted — so the thread appears in timelines but the replies do not flood them.

---
visibility: unlisted
---

visibility: public
Opening post — visible in the public timeline.

---

Second post — unlisted, appears only in the thread view.

---

Third post — still unlisted.

The --visibility flag on the command line overrides the frontmatter value for all posts that do not specify their own per-post visibility.


Previewing with --dry-run

Use --dry-run to parse and preview the thread without sending anything to the server:

taibai thread my-thread.txt --dry-run

Example output:

Thread preview — 3 posts, default visibility: unlisted, cw: My long thread
  [1/3] public | 52 chars — 'Opening post — visible in the public timeline.'
  [2/3] unlisted | 54 chars — 'Second post — unlisted, appears only in the thread view.'
  [3/3] unlisted | 22 chars — 'Third post — still unlisted.'

Overriding frontmatter from the CLI

The --visibility and --cw flags override the frontmatter values for posts that do not have their own per-post metadata:

# Post the entire thread as private, regardless of what the file says
taibai thread draft.thread --visibility private

# Add a content warning to all posts that don't already have one
taibai thread notes.thread --cw "Long read"

Progress output

Each status is printed as it is posted:

[1/3] Posted: https://mastodon.social/@you/109031952222346765
[2/3] Posted: https://mastodon.social/@you/109031952222346766
[3/3] Posted: https://mastodon.social/@you/109031952222346767

If any post fails, taibai exits immediately. Posts already sent are not deleted.


Options reference

Option Short Default Description
FILE Path to the thread file
--visibility -v Override frontmatter visibility for all posts without per-post visibility
--cw Override frontmatter content warning for all posts without per-post cw
--dry-run off Parse and preview posts without sending
--profile -p default Profile name (TAIBAI_PROFILE env var)