Overview
The Postiz CLI is a command-line tool for interacting with the Postiz API. Perform all API operations directly from your terminal without writing code.Installation
The CLI is included in the Postiz monorepo underapps/cli. To use it:
Authentication
Set your API key as an environment variable:Persistent Configuration
Add to your.bashrc, .zshrc, or .profile:
Quick Start
Verify your setup by listing integrations:Available Commands
The Postiz CLI provides commands for all major API operations:Posts
posts:create
Create and schedule posts
posts:list
List scheduled and published posts
posts:delete
Delete a post by ID
Integrations
integrations:list
List connected social media accounts
integrations:settings
Get platform-specific settings schema
integrations:trigger
Trigger integration tools for additional data
Media
upload
Upload images, videos, and files
Command Structure
All commands follow this pattern:Global Options
Display help information for any command
Display CLI version
Common Usage Patterns
Simple Post
Post with Media
Twitter Thread
Multi-Platform Post
List and Delete Posts
Complex Posts with JSON
For complex posts with platform-specific settings, use a JSON file:Shell Scripting
Integrate the CLI into shell scripts:Pipeline Integration
Use in CI/CD pipelines:Output Formats
The CLI outputs JSON for easy parsing:Error Handling
The CLI exits with appropriate status codes:0- Success1- Error (invalid arguments, API error, etc.)
Configuration File
The CLI reads configuration from environment variables defined inapps/cli/src/config.ts:
Next Steps
CLI Commands
Detailed command reference
Node.js SDK
Use the programmatic SDK instead
API Reference
Full API documentation
Node.js SDK
Use the JavaScript SDK