Skip to main content
The Postiz CLI is a command-line tool for automating social media posting across 28+ platforms. It wraps the Public API so you can schedule posts, manage integrations, and upload media directly from your terminal or shell scripts.

Installation

npm install -g postiz
Verify the installation:
postiz --help

Setup

API Key

Set your Postiz API key as an environment variable. You can get your API key from the Postiz Settings page.
export POSTIZ_API_KEY=your_api_key_here
Add this to your shell profile (~/.bashrc, ~/.zshrc, etc.) so it persists across sessions.

Custom API URL (self-hosted)

If you’re running a self-hosted Postiz instance, point the CLI to your server:
export POSTIZ_API_URL=https://your-postiz-server.com

Quick Start

# 1. List your connected social media accounts
postiz integrations:list

# 2. Create a scheduled post
postiz posts:create \
  -c "Hello from the Postiz CLI!" \
  -s "2025-01-15T10:00:00Z" \
  -i "your-integration-id"

# 3. List your scheduled posts
postiz posts:list

Commands Overview

CommandDescription
integrations:listList all connected social media accounts
integrations:settingsGet the settings schema for an integration
integrations:triggerTrigger a dynamic tool on an integration
posts:createCreate a new post
posts:listList posts with optional date filtering
posts:deleteDelete a post by ID
uploadUpload a media file
All commands output JSON, making the CLI easy to use in scripts and automation pipelines.