Social Media CLI for Codex
Automate social media posting across 30+ platforms. Built for OpenAI Codex to schedule, publish, and manage your social media presence directly from the CLI and your IDE.
Please make sure there is always a human in the loop.
Get Started in Seconds
Terminal
# Install the skill
npx skills add gitroomhq/postiz-agent
# Set your API key
export POSTIZ_API_KEY=your_api_key
# Use Codex to interact with Postiz
codex "list my social media integrations"
# Create your first post
codex "post 'Hello from Postiz Agent!' to Twitter, schedule for tomorrow at 9am"Built for Automation
AI Agent Ready
Every command outputs structured JSON. Designed for LLMs and automation pipelines to parse, plan, and execute social media workflows.
30+ Platforms
Post to Twitter/X, LinkedIn, Reddit, Instagram, YouTube, TikTok, and 22 more platforms from a single CLI.
Threads & Comments
Create threaded posts with multiple comments, each with their own media. Automatic conversion to platform-native threads.
Rich Media Support
Upload and attach images, videos, audio, and documents. Supports PNG, JPG, MP4, MOV, PDF, and many more formats.
Scheduled Posting
Schedule posts with precise timestamps, create drafts for review, and batch schedule entire content campaigns.
Platform-Specific Settings
Dynamic discovery of platform features like Reddit flairs, YouTube playlists, Pinterest boards, and LinkedIn company pages.
How It Works
Discover Integrations
List all your connected social media accounts and discover platform-specific features like subreddit flairs and YouTube playlists.
Discovery
postiz integrations:list
# Get platform settings
postiz integrations:settings <id>
# Fetch platform-specific data
postiz integrations:trigger <id> getFlairs \
-d '{"subreddit":"programming"}'Create Posts
Compose posts with content, media, comments, and platform-specific settings. Use simple CLI flags for quick posts or JSON files for complex campaigns.
Post Creation
# Simple post
postiz posts:create \
-c "Check out our new feature!" \
-m "screenshot.png" \
-s "2025-01-15T09:00:00Z" \
-i "twitter-id,linkedin-id"
# Complex post from JSON
postiz posts:create --json campaign.jsonManage & Analyze
List, filter, and manage your scheduled posts. Track performance with platform and post-level analytics. Build batch workflows to schedule entire content campaigns programmatically.
Management & Analytics
# List scheduled posts
postiz posts:list
# Get platform analytics (last 30 days)
postiz analytics:platform <id> -d 30
# Get analytics for a specific post
postiz analytics:post <post-id> -d 7
# Upload media for reuse
postiz upload video.mp4One Command, Every Platform
Post to multiple platforms simultaneously, each with their own media and platform-specific settings.
Terminal
# Post to multiple platforms at once
postiz posts:create \
-c "Launching our new feature today!" \
-m "banner.png" \
-s "2025-03-01T09:00:00Z" \
-i "twitter-id,linkedin-id,facebook-id"
# Post with threaded comments
postiz posts:create \
-c "Main announcement post" -m "hero.png" \
-c "First follow-up comment" -m "demo.gif" \
-c "Links and resources" \
-s "2025-03-01T09:00:00Z" \
-i "twitter-id,reddit-id"
# Post with platform-specific settings
postiz posts:create \
-c "Check out this tutorial" \
-m "video.mp4" \
-s "2025-03-01T09:00:00Z" \
--settings '{"subreddit":[{"value":{"subreddit":"programming","title":"New Tutorial","type":"text"}}]}' \
-i "reddit-id"
# Batch schedule a week of content
for day in 1 2 3 4 5; do
postiz posts:create \
-c "Day $day content" \
-s "2025-03-0${day}T09:00:00Z" \
-i "twitter-id,linkedin-id"
doneWhat is Codex?
Codex is OpenAI's autonomous coding agent. It runs in your terminal and IDE, executes shell commands in a sandboxed environment, and completes multi-step tasks autonomously โ including managing your social media with Postiz.
CLI & IDE Native
Codex runs directly in your terminal or IDE. No browser or cloud setup needed โ just run codex from the command line to manage your social media workflow.
Autonomous Execution
Codex executes shell commands in a sandboxed environment. It reads SKILL.md, discovers Postiz commands, and chains them together for complex workflows.
Parallel Tasks
Run multiple Codex sessions in parallel. Schedule posts on one terminal while analyzing metrics on another โ each task runs independently and concurrently.
How Postiz Works with Codex
Codex discovers Postiz through the SKILL.md file in your project. Once it reads the skill definition, it can execute all Postiz commands in a sandboxed environment โ safely and autonomously.
- โInstall Postiz Agent globally with npx skills add
- โCodex reads the SKILL.md file to discover available commands
- โSet POSTIZ_API_KEY as an environment variable
- โCommands run in Codex's sandboxed environment for safety
- โRun Postiz tasks in parallel with your coding workflows
Install Postiz
# Install the Postiz skill
npx skills add gitroomhq/postiz-agent
# Set your API key
export POSTIZ_API_KEY=your_api_key
# Codex discovers Postiz via SKILL.md
codex "list my social media integrations"
# Codex autonomously runs:
# postiz integrations:listPost From Your Terminal
Tell Codex what to post from your terminal โ it reads the SKILL.md, discovers your integrations, and handles the entire publishing workflow in its sandboxed environment.
CLI Workflow
One command, full automation
Tell Codex what to post from your terminal. It connects to Postiz, discovers your accounts, uploads media, and schedules posts โ all autonomously in a sandboxed environment.
Terminal
$ codex "Post my blog article to Twitter,
LinkedIn, and Reddit with the cover
image, schedule for tomorrow at 9am"
Codex: I'll handle that.
1. Reading SKILL.md for Postiz commands
2. Found your integrations via Postiz
3. Uploading cover image
4. Scheduling across 3 platforms
Done! Posts scheduled:
- X (Twitter): scheduled 9:00 AM
- LinkedIn: scheduled 9:00 AM
- Reddit (r/programming): scheduled 9:00 AMParallel Tasks
Multiple agents, concurrent execution
Run multiple Codex sessions at the same time. Schedule a week of content in one terminal while refactoring code in another โ each task runs independently.
Multiple Terminals
# Terminal 1 โ schedule content
$ codex "Schedule a week of daily posts
to Twitter and LinkedIn, using the
content from ~/content/drafts"
# Terminal 2 โ check analytics
$ codex "Get my social media analytics
for the last 30 days across all
platforms and summarize the results"
# Terminal 3 โ keep coding
$ codex "Refactor the auth module
to use JWT tokens"Why Codex + Postiz
- โCLI-native โ runs directly in your terminal or IDE
- โAutonomous execution in a sandboxed environment
- โParallel tasks โ run social media and coding side by side
- โSKILL.md discovery โ Codex learns Postiz commands automatically
- โCross-post to multiple platforms in a single request
- โPowered by OpenAI's most capable models
SKILL.md (auto-discovered)
---
name: postiz
description: Social media automation
CLI for scheduling posts across
30+ platforms
metadata:
codex:
requirements:
env:
- POSTIZ_API_KEY
binaries:
- postiz
---
# Available Commands
- postiz integrations:list
- postiz integrations:settings <id>
- postiz posts:create
- postiz upload <file>
- postiz analytics:platform <id>Also Works with Claude Code
Postiz Agent is a CLI tool โ it works with any AI agent that can run shell commands, including Anthropic's Claude Code.
Claude Code
by Anthropic
Claude reads the SKILL.md file to learn all available Postiz commands. It autonomously discovers your integrations, uploads media, composes posts with platform-specific settings, and schedules content across all your connected platforms.
Claude Code
> Schedule a tweet for tomorrow morning
announcing our new feature, attach
the screenshot from ./assets/launch.png
Claude will automatically run:
postiz integrations:list
postiz upload ./assets/launch.png
postiz posts:create \
-c "We just launched..." \
-m "uploaded-url" \
-s "2025-03-02T09:00:00Z" \
-i "twitter-id"Command Reference
| Command | Description |
|---|---|
postiz integrations:list | List all connected social media accounts |
postiz integrations:settings <id> | Get platform-specific settings schema |
postiz integrations:trigger <id> <method> | Trigger platform tools (flairs, playlists, etc.) |
postiz posts:create | Create and schedule a new post |
postiz posts:list | List all scheduled and published posts |
postiz posts:delete <id> | Delete a scheduled post |
postiz analytics:platform <id> | Get analytics for an integration/channel |
postiz analytics:post <id> | Get analytics for a specific post |
postiz upload <file> | Upload media and get a reusable URL |
25+ Supported Platforms
Connect once, post everywhere. Each platform has a dedicated guide with settings reference, CLI examples, and AI agent workflows.
X (Twitter)
โTweets, threads, and reply controls
Professional posts and image carousels
Feed posts, stories, and reels
Text posts, links, and media
Subreddits, flairs, and post types
YouTube
โVideo uploads, thumbnails, and tags
TikTok
โVideos, privacy, duets, and stitches
Pins, boards, and link pins
Discord
โChannel messaging and media
Slack
โChannel messaging and team updates
Telegram
โBot-powered channel messaging
Twitch
โChat messages and announcements
Kick
โChat messages and notifications
Medium
โArticles, publications, and tags
Dev.to
โDeveloper articles and organizations
Hashnode
โBlog posts and publications
WordPress
โPosts, pages, and featured images
Dribbble
โDesign shots and team portfolios
Warpcast
โFarcaster casts and channels
Lemmy
โFederated community posts
Moltbook
โAI agent social network
Google My Business
โBusiness posts, events, and offers
Listmonk
โEmail campaigns and newsletters
Skool
โCommunity posts and groups
Whop
โCompany forums and experiences
Start automating today
Install Postiz Agent and let Codex handle social media posting across all your platforms from the terminal.
Ready to get started?
Grow your social media presence with Postiz.
Schedule, analyze, and engage with your audience.
Open-source social media scheduling tool