Skip to content

feat-posts-create-expose-native-x-threaditems #4

@mrgoonie

Description

@mrgoonie

Problem

The Zernio API already supports native X/Twitter threads through TwitterPlatformData.threadItems inside platformSpecificData on a Twitter/X platform target.

OpenAPI fields confirmed:

  • platformSpecificData.threadItems: complete sequence of tweets in a thread; threadItems[0] becomes the root tweet, later items are chained as replies
  • platformSpecificData.replyToTweetId: first tweet can reply to an existing tweet
  • platformSpecificData.quoteTweetId: first tweet can quote an existing tweet where X permits it
  • platformSpecificData.replySettings: controls who can reply

However, zernio posts:create currently exposes only generic fields such as --text, --accounts, --media, --scheduledAt, etc. There is no CLI-level way to pass threadItems, and therefore no agent-friendly way to publish a native X thread without dropping down to raw API/SDK calls.

Related existing issue: #1 covers quote/reply options. This issue scopes the broader CLI gap around native X threads and platformSpecificData passthrough.

Why it matters

AI agents and scheduled content pipelines need to publish multi-tweet posts as real X threads, not fake long single posts or manually chained replies.

A CLI should expose the API's thread capability because:

  • agents can generate a thread as a file or JSON array
  • cron/content workflows can publish the whole thread atomically through one command
  • each tweet in the thread may need its own content and optional media
  • content top-level has different semantics when threadItems is used, so hiding this behind --text alone is confusing

Expected behavior

Add CLI support for native X/Twitter thread publishing, for example:

zernio posts:create \
  --accounts <twitterAccountId> \
  --text "Thread display title" \
  --threadJson '["tweet 1", "tweet 2", "tweet 3"]'

and:

zernio posts:create \
  --accounts <twitterAccountId> \
  --text "Thread display title" \
  --threadFile ./thread.txt

Where thread.txt can use a simple separator:

tweet 1
---
tweet 2
---
tweet 3

Also useful:

zernio posts:create \
  --accounts <twitterAccountId> \
  --text "my take" \
  --replyToTweetId 2061975910467698972

zernio posts:create \
  --accounts <twitterAccountId> \
  --text "my take" \
  --quoteTweetId https://x.com/user/status/2061975910467698972

Acceptance criteria

  • posts:create exposes a way to pass X threadItems
  • Supports JSON array input for automation
  • Supports file input for agent/human workflows
  • Allows per-tweet media via mediaItems inside thread items
  • Fails clearly when X-specific options are used with non-X accounts
  • Documents that when threadItems is present, top-level content/--text is only for Zernio display/search and is not published as the root tweet
  • Keeps existing single-post behavior unchanged

Proposed implementation

Add CLI options:

  • --threadJson
  • --threadFile
  • --replyToTweetId
  • --quoteTweetId
  • --replySettings
  • --platformSpecificData for advanced passthrough

Then map these to:

{
  "platforms": [
    {
      "platform": "twitter",
      "accountId": "...",
      "platformSpecificData": {
        "threadItems": [
          { "content": "tweet 1" },
          { "content": "tweet 2" }
        ]
      }
    }
  ],
  "publishNow": true
}

Notes

I am opening a PR with a first implementation for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions