# How to publish an X thread from JSON with the DunSocial CLI > Prepare, validate and schedule a connected X thread from a JSON file with the DunSocial CLI while preserving a final human review. - Published: 2026-08-06 - Last updated: 2026-08-06 - Author: DunSocial - Topics: cli, how-to --- A JSON file is a useful review artifact for a thread: every post is visible, ordered and versionable before the command runs. Keep generated files out of production until someone has read the whole chain. DunSocial supports X threads of two to twenty-five posts. The CLI accepts an array or an object containing `tweets`. Search phrases: publish X thread from JSON, Twitter thread CLI, DunSocial schedule thread, command line X scheduler, automate launch thread. ## What you will do - Create a valid thread file. - Schedule it to one connected X account. - Verify the thread as one queued chain. ## Before you start - Node.js 20 or newer and the DunSocial CLI installed with `npm install -g dunsocial`. - A selected workspace and the DunSocial account IDs returned by `dun accounts list`. - Browser login for a laptop, or a workspace-bound token stored in a secret manager for automation. - One connected X account and reviewed thread copy containing no secrets or internal links. ## Step by step ### 1. Create the thread file Keep one post per array item and read the transitions in order. ``` [ "We shipped a faster export pipeline today.", "Large reports now prepare in the background, so you can keep working.", "The implementation notes and upgrade details are in the changelog: https://example.com/changelog" ] ``` ### 2. Check the account Filter the account list to X and copy the DunSocial ID. ``` dun accounts list --platform x ``` ### 3. Schedule the thread Use the single account ID and an explicit time or reviewed relative delay. ``` dun posts schedule-thread \ --account X_ACCOUNT_ID \ --file ./thread.json \ --in 30m ``` ### 4. Verify the chain Open the DunSocial preview and check ordering, links and the first post. Confirm the queue contains one thread rather than separate duplicate posts. ## Check before you finish - `dun workspace current` shows the intended workspace before a write command. - The command uses DunSocial account IDs rather than social @handles. - The new item appears in DunSocial with the expected CLI source, copy and time. ## Where to go next Use `--json` in automation and preserve the returned thread or post ID for cancellation and audit. --- ## About this document This is the Markdown representation of https://www.dunsocial.com/blog/publish-an-x-thread-from-json-with-the-dunsocial-cli. The HTML version of the same page is at the same URL. You can also request Markdown from any page by sending `Accept: text/markdown`. Machine-readable summary of the whole site: https://www.dunsocial.com/llms.txt ## Company - Product: DunSocial, https://www.dunsocial.com - Legal entity: THISUX PRIVATE LIMITED, Chennai, Tamil Nadu, India - Support: support@dunsocial.com - Open the app: https://app.dunsocial.com/login