Skip to main content
For your AI agent to work best with SocialSyncs, install the skill by running:
npx skills add lakshit77/socialsyncs-agent
Or load the SKILL md file from github.com/lakshit77/socialsyncs-agent.
The SocialSyncs 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 socialsyncs
Verify the installation:
socialsyncs --help

Authentication

Authenticate using the device flow — no client ID or secret needed:
socialsyncs auth:login
This will:
  1. Display a one-time code in your terminal
  2. Open your browser to authorize
  3. Automatically save credentials to ~/.socialsyncs/credentials.json
# Check current auth status
socialsyncs auth:status

# Remove stored credentials
socialsyncs auth:logout

Option 2: API Key

Set your SocialSyncs API key as an environment variable. You can get your API key from the SocialSyncs Settings page.
export POSTIZ_API_KEY=your_api_key_here
Add this to your shell profile (~/.bashrc, ~/.zshrc, etc.) so it persists across sessions.
OAuth2 credentials take priority over the API key when both are present.

Custom API URL (self-hosted)

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

Self-Hosting the Auth Server

By default, socialsyncs auth:login uses the hosted auth server at cli-auth.socialsyncs.co. If you want to self-host the OAuth2 device flow server, see the Authentication page for the full setup guide.

Quick Start

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

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

# 3. List your scheduled posts
socialsyncs posts:list

Commands Overview

CommandDescription
auth:loginAuthenticate via OAuth2 device flow
auth:statusCheck current authentication status
auth:logoutRemove stored credentials
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
posts:missingList available content from provider for a post with missing release ID
posts:connectConnect a post to its published content by release ID
analytics:platformGet analytics for an integration/channel
analytics:postGet analytics for a specific post
uploadUpload a media file
All commands output JSON, making the CLI easy to use in scripts and automation pipelines.