Create and publish content
Create text, threads, media posts, and format-specific Publications from the CLI.
Text posts
Use post for short text and simple scheduled posts:
openpost post create \
--content "The new import flow is live." \
--accounts x,linkedinAdd --schedule "tomorrow 2pm", an RFC 3339 timestamp, or --schedule next-slot. The CLI shows the resolved time before it accepts a natural-language schedule.
Omit --accounts to create a draft without destinations.
Threads
Separate thread segments with a line containing ---:
We rebuilt the import flow.
---
It now checks every row before saving.openpost thread create ./thread.md --accounts x --schedule next-slotSelected mentions and structured threads
Look up a person or company through the destination account:
openpost account mentions acc_bluesky --query alice --jsonSave ordered segment objects in segments.json, including each body and its settings.mentions. Use the HTTP mention contract for UTF-8 byte ranges and stable targets.
openpost post create --segments-file segments.json --accounts acc_bluesky
openpost post update pub_... --segments-file segments.jsonKeep server segment IDs when replacing an existing thread. publication create and publication update accept the same flag. Use --segments-file - for standard input. Ordinary --content edits remain available; edits that would ambiguously change a selected identity require structured input.
Changing shared attachments with post update --media preserves the other thread parts and independent account versions.
Media and provider-specific formats
--media accepts an existing media ID or a local file path. Repeat it for multiple attachments:
openpost publication create \
--content-profile image_post \
--accounts linkedin \
--content "The new import flow is live." \
--media ./cover.png \
--media-alt "Product import screen with the completed file list"Use publication create for link shares, carousels, stories, short video, and long video. Provider-specific flags include --video-title, --video-description, --privacy, --tiktok-method, and --tiktok-privacy.
openpost publication create \
--content-profile long_video \
--accounts youtube \
--video-title "Import walkthrough" \
--video-description "A complete walkthrough of the new flow." \
--privacy private \
--media ./walkthrough.mp4Run openpost provider readiness --json before a new provider workflow. Use openpost provider capabilities --provider <key> --json before choosing a content profile or provider setting.
Validate and run the lifecycle
openpost publication validate <publication-id> --json
openpost publication schedule <publication-id> --at "Friday 10am"
openpost publication publish-now <publication-id>Creating a Publication never publishes it as a hidden side effect. A --schedule on the create command creates the draft, then schedules that saved Publication.