
Security News
TC39 Advances Temporal to Stage 4 Alongside Several ECMAScript Proposals
TC39’s March 2026 meeting advanced eight ECMAScript proposals, including Temporal reaching Stage 4 and securing its place in the ECMAScript 2026 specification.
Social media automation CLI for AI agents - Schedule posts across 28+ platforms programmatically.
The Postiz CLI provides a command-line interface to the Postiz API, enabling developers and AI agents to automate social media posting, manage content, and handle media uploads across platforms like Twitter/X, LinkedIn, Reddit, YouTube, TikTok, Instagram, Facebook, and more.
npm install -g postiz
# or
pnpm install -g postiz
git clone https://github.com/gitroomhq/postiz-app.git
cd postiz-app/apps/cli
pnpm install
pnpm run build
pnpm link --global
pnpm install
pnpm run build
pnpm link --global
# Or run directly without linking
pnpm run start -- posts:list
Required: Set your Postiz API key
export POSTIZ_API_KEY=your_api_key_here
Optional: Custom API endpoint
export POSTIZ_API_URL=https://your-custom-api.com
List all connected integrations
postiz integrations:list
Returns integration IDs, provider names, and metadata.
Get integration settings schema
postiz integrations:settings <integration-id>
Returns character limits, required settings, and available tools for fetching dynamic data.
Trigger integration tools
postiz integrations:trigger <integration-id> <method-name>
postiz integrations:trigger <integration-id> <method-name> -d '{"key":"value"}'
Fetch dynamic data like Reddit flairs, YouTube playlists, LinkedIn companies, etc.
Examples:
# Get Reddit flairs
postiz integrations:trigger reddit-123 getFlairs -d '{"subreddit":"programming"}'
# Get YouTube playlists
postiz integrations:trigger youtube-456 getPlaylists
# Get LinkedIn companies
postiz integrations:trigger linkedin-789 getCompanies
Simple scheduled post
postiz posts:create -c "Content" -s "2024-12-31T12:00:00Z" -i "integration-id"
Draft post
postiz posts:create -c "Content" -s "2024-12-31T12:00:00Z" -t draft -i "integration-id"
Post with media
postiz posts:create -c "Content" -m "img1.jpg,img2.jpg" -s "2024-12-31T12:00:00Z" -i "integration-id"
Post with comments (each comment can have its own media)
postiz posts:create \
-c "Main post" -m "main.jpg" \
-c "First comment" -m "comment1.jpg" \
-c "Second comment" -m "comment2.jpg,comment3.jpg" \
-s "2024-12-31T12:00:00Z" \
-i "integration-id"
Multi-platform post
postiz posts:create -c "Content" -s "2024-12-31T12:00:00Z" -i "twitter-id,linkedin-id,facebook-id"
Platform-specific settings
postiz posts:create \
-c "Content" \
-s "2024-12-31T12:00:00Z" \
--settings '{"subreddit":[{"value":{"subreddit":"programming","title":"Post Title","type":"text"}}]}' \
-i "reddit-id"
Complex post from JSON file
postiz posts:create --json post.json
Options:
-c, --content - Post/comment content (use multiple times for posts with comments)-s, --date - Schedule date in ISO 8601 format (REQUIRED)-t, --type - Post type: "schedule" or "draft" (default: "schedule")-m, --media - Comma-separated media URLs for corresponding -c-i, --integrations - Comma-separated integration IDs (required)-d, --delay - Delay between comments in milliseconds (default: 5000)--settings - Platform-specific settings as JSON string-j, --json - Path to JSON file with full post structure--shortLink - Use short links (default: true)List posts
postiz posts:list
postiz posts:list --startDate "2024-01-01T00:00:00Z" --endDate "2024-12-31T23:59:59Z"
postiz posts:list --customer "customer-id"
Defaults to last 30 days to next 30 days if dates not specified.
Delete post
postiz posts:delete <post-id>
Upload file and get URL
postiz upload <file-path>
⚠️ IMPORTANT: Upload Files Before Posting
You must upload media files to Postiz before using them in posts. Many platforms (especially TikTok, Instagram, and YouTube) require verified/trusted URLs and will reject external links.
Workflow:
postiz upload-m parameterSupported formats:
Example:
# 1. Upload the file first
RESULT=$(postiz upload video.mp4)
PATH=$(echo "$RESULT" | jq -r '.path')
# 2. Use the Postiz URL in your post
postiz posts:create -c "Check out my video!" -s "2024-12-31T12:00:00Z" -m "$PATH" -i "tiktok-id"
Why this is required:
# Get available flairs
postiz integrations:trigger reddit-id getFlairs -d '{"subreddit":"programming"}'
# Post with subreddit and flair
postiz posts:create \
-c "Content" \
-s "2024-12-31T12:00:00Z" \
--settings '{"subreddit":[{"value":{"subreddit":"programming","title":"My Post","type":"text","is_flair_required":true,"flair":{"id":"flair-123","name":"Discussion"}}}]}' \
-i "reddit-id"
# Get playlists
postiz integrations:trigger youtube-id getPlaylists
# Upload video FIRST (required!)
VIDEO=$(postiz upload video.mp4)
VIDEO_URL=$(echo "$VIDEO" | jq -r '.path')
# Post with uploaded video URL
postiz posts:create \
-c "Video description" \
-s "2024-12-31T12:00:00Z" \
--settings '{"title":"Video Title","type":"public","tags":[{"value":"tech","label":"Tech"}],"playlistId":"playlist-id"}' \
-m "$VIDEO_URL" \
-i "youtube-id"
# Upload video FIRST (TikTok only accepts verified URLs!)
VIDEO=$(postiz upload video.mp4)
VIDEO_URL=$(echo "$VIDEO" | jq -r '.path')
# Post with uploaded video URL
postiz posts:create \
-c "Video caption #fyp" \
-s "2024-12-31T12:00:00Z" \
--settings '{"privacy":"PUBLIC_TO_EVERYONE","duet":true,"stitch":true}' \
-m "$VIDEO_URL" \
-i "tiktok-id"
# Get companies you can post to
postiz integrations:trigger linkedin-id getCompanies
# Post as company
postiz posts:create \
-c "Company announcement" \
-s "2024-12-31T12:00:00Z" \
--settings '{"companyId":"company-123"}' \
-i "linkedin-id"
# Create thread
postiz posts:create \
-c "Thread 1/3 🧵" \
-c "Thread 2/3" \
-c "Thread 3/3" \
-s "2024-12-31T12:00:00Z" \
-d 2000 \
-i "twitter-id"
# With reply settings
postiz posts:create \
-c "Tweet content" \
-s "2024-12-31T12:00:00Z" \
--settings '{"who_can_reply_post":"everyone"}' \
-i "twitter-id"
# Upload image FIRST (Instagram requires verified URLs!)
IMAGE=$(postiz upload image.jpg)
IMAGE_URL=$(echo "$IMAGE" | jq -r '.path')
# Regular post
postiz posts:create \
-c "Caption #hashtag" \
-s "2024-12-31T12:00:00Z" \
--settings '{"post_type":"post"}' \
-m "$IMAGE_URL" \
-i "instagram-id"
# Story (upload first)
STORY=$(postiz upload story.jpg)
STORY_URL=$(echo "$STORY" | jq -r '.path')
postiz posts:create \
-c "" \
-s "2024-12-31T12:00:00Z" \
--settings '{"post_type":"story"}' \
-m "$STORY_URL" \
-i "instagram-id"
See PROVIDER_SETTINGS.md for all 28+ platforms.
The CLI enables dynamic discovery of integration capabilities:
This allows AI agents to adapt to different platforms without hardcoded knowledge.
For complex posts with multiple platforms and settings:
postiz posts:create --json complex-post.json
JSON structure:
{
"integrations": ["twitter-123", "linkedin-456"],
"posts": [
{
"provider": "twitter",
"post": [
{
"content": "Tweet version",
"image": ["twitter-image.jpg"]
}
]
},
{
"provider": "linkedin",
"post": [
{
"content": "LinkedIn version with more context...",
"image": ["linkedin-image.jpg"]
}
],
"settings": {
"__type": "linkedin",
"companyId": "company-123"
}
}
]
}
Every command outputs JSON for easy parsing:
INTEGRATIONS=$(postiz integrations:list | jq -r '.')
REDDIT_ID=$(echo "$INTEGRATIONS" | jq -r '.[] | select(.identifier=="reddit") | .id')
Comments are automatically converted to threads/replies based on platform:
postiz posts:create \
-c "Main post" \
-c "Comment 1" \
-c "Comment 2" \
-i "integration-id"
#!/bin/bash
REDDIT_ID=$(postiz integrations:list | jq -r '.[] | select(.identifier=="reddit") | .id')
FLAIRS=$(postiz integrations:trigger "$REDDIT_ID" getFlairs -d '{"subreddit":"programming"}')
FLAIR_ID=$(echo "$FLAIRS" | jq -r '.output[0].id')
postiz posts:create \
-c "My post content" \
-s "2024-12-31T12:00:00Z" \
--settings "{\"subreddit\":[{\"value\":{\"subreddit\":\"programming\",\"title\":\"Post Title\",\"type\":\"text\",\"is_flair_required\":true,\"flair\":{\"id\":\"$FLAIR_ID\",\"name\":\"Discussion\"}}}]}" \
-i "$REDDIT_ID"
#!/bin/bash
VIDEO=$(postiz upload video.mp4)
VIDEO_PATH=$(echo "$VIDEO" | jq -r '.path')
postiz posts:create \
-c "Video description..." \
-s "2024-12-31T12:00:00Z" \
--settings '{"title":"My Video","type":"public","tags":[{"value":"tech","label":"Tech"}]}' \
-m "$VIDEO_PATH" \
-i "youtube-id"
#!/bin/bash
postiz posts:create \
-c "Same content everywhere" \
-s "2024-12-31T12:00:00Z" \
-m "image.jpg" \
-i "twitter-id,linkedin-id,facebook-id"
#!/bin/bash
DATES=("2024-02-14T09:00:00Z" "2024-02-15T09:00:00Z" "2024-02-16T09:00:00Z")
CONTENT=("Monday motivation 💪" "Tuesday tips 💡" "Wednesday wisdom 🧠")
for i in "${!DATES[@]}"; do
postiz posts:create \
-c "${CONTENT[$i]}" \
-s "${DATES[$i]}" \
-i "twitter-id"
done
For AI Agents:
Deep-Dive Guides:
Examples:
The CLI interacts with these Postiz API endpoints:
| Endpoint | Method | Purpose |
|---|---|---|
/public/v1/posts | POST | Create a post |
/public/v1/posts | GET | List posts |
/public/v1/posts/:id | DELETE | Delete a post |
/public/v1/integrations | GET | List integrations |
/public/v1/integration-settings/:id | GET | Get integration settings |
/public/v1/integration-trigger/:id | POST | Trigger integration tool |
/public/v1/upload | POST | Upload media |
| Variable | Required | Default | Description |
|---|---|---|---|
POSTIZ_API_KEY | ✅ Yes | - | Your Postiz API key |
POSTIZ_API_URL | No | https://api.postiz.com | Custom API endpoint |
The CLI provides clear error messages with exit codes:
Common errors:
| Error | Solution |
|---|---|
POSTIZ_API_KEY is not set | Set environment variable: export POSTIZ_API_KEY=key |
Integration not found | Run integrations:list to get valid IDs |
startDate/endDate required | Use ISO 8601 format: "2024-12-31T12:00:00Z" |
Invalid settings | Check integrations:settings for required fields |
Tool not found | Check available tools in integrations:settings output |
Upload failed | Verify file exists and format is supported |
src/
├── index.ts # CLI entry point with yargs
├── api.ts # PostizAPI client class
├── config.ts # Environment configuration
└── commands/
├── posts.ts # Post management commands
├── integrations.ts # Integration commands
└── upload.ts # Media upload command
examples/ # Example scripts and JSON files
package.json
tsconfig.json
tsup.config.ts # Build configuration
README.md # This file
SKILL.md # AI agent reference
pnpm run dev # Watch mode for development
pnpm run build # Build the CLI
pnpm run start # Run the built CLI
The CLI uses tsup for bundling:
pnpm run build
Output in dist/:
index.js - Bundled executable with shebangindex.js.map - Source map# Environment setup
export POSTIZ_API_KEY=your_key
# Discovery
postiz integrations:list # List integrations
postiz integrations:settings <id> # Get settings
postiz integrations:trigger <id> <method> -d '{}' # Fetch data
# Posting (date is required)
postiz posts:create -c "text" -s "2024-12-31T12:00:00Z" -i "id" # Simple
postiz posts:create -c "text" -s "2024-12-31T12:00:00Z" -t draft -i "id" # Draft
postiz posts:create -c "text" -m "img.jpg" -s "2024-12-31T12:00:00Z" -i "id" # With media
postiz posts:create -c "main" -c "comment" -s "2024-12-31T12:00:00Z" -i "id" # With comment
postiz posts:create -c "text" -s "2024-12-31T12:00:00Z" --settings '{}' -i "id" # Platform-specific
postiz posts:create --json file.json # Complex
# Management
postiz posts:list # List posts
postiz posts:delete <id> # Delete post
postiz upload <file> # Upload media
# Help
postiz --help # Show help
postiz posts:create --help # Command help
This CLI is part of the Postiz monorepo.
To contribute:
apps/cli/pnpm run buildAGPL-3.0
28+ platforms including:
| Platform | Integration Tools | Settings |
|---|---|---|
| Twitter/X | getLists, getCommunities | who_can_reply_post |
| getCompanies | companyId, carousel | |
| getFlairs, searchSubreddits | subreddit, title, flair | |
| YouTube | getPlaylists, getCategories | title, type, tags, playlistId |
| TikTok | - | privacy, duet, stitch |
| - | post_type (post/story) | |
| getPages | - | |
| getBoards, getBoardSections | - | |
| Discord | getChannels | - |
| Slack | getChannels | - |
| And 18+ more... |
See PROVIDER_SETTINGS.md for complete documentation.
FAQs
Postiz CLI - Command line interface for the Postiz social media scheduling API
The npm package postiz receives a total of 312 weekly downloads. As such, postiz popularity was classified as not popular.
We found that postiz demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
TC39’s March 2026 meeting advanced eight ECMAScript proposals, including Temporal reaching Stage 4 and securing its place in the ECMAScript 2026 specification.

Research
/Security News
Since January 31, 2026, we identified at least 72 additional malicious Open VSX extensions, including transitive GlassWorm loader extensions targeting developers.

Research
Six malicious Packagist packages posing as OphimCMS themes contain trojanized jQuery that exfiltrates URLs, injects ads, and loads FUNNULL-linked redirects.