Skip to content

CLI

Schedule posts, manage inbox, broadcasts, sequences, and automations across 14 platforms from the terminal. Built for developers and AI agents.

Schedule posts, manage inbox, broadcasts, sequences, and automations across 14 platforms from the terminal. Built for developers and AI agents. Outputs JSON by default.

Setup

Install the CLI

bash
npm install -g @zernio/cli

Authenticate

bash
zernio auth:login

This opens your browser where you can authorize the CLI. An API key is created automatically and saved to ~/.zernio/config.json.

You can optionally set a custom device name:

bash
zernio auth:login --device-name "my-server"

Running auth:login again from the same device replaces the existing key (no duplicates).

bash
zernio auth:set --key "sk_your-api-key"

Get your API key from zernio.com/dashboard/api-keys.

Verify Setup

bash
zernio auth:check

This should confirm your API key is valid and display your account info.

Quick Example

bash
# Schedule a post for tomorrow at 9am
zernio posts:create \
  --text "Hello from the Zernio CLI!" \
  --accounts <accountId1>,<accountId2> \
  --scheduledAt "2025-06-01T09:00:00Z"

# List your DM conversations
zernio inbox:conversations --platform instagram --pretty

# Create a broadcast and send it
zernio broadcasts:create --profileId <id> --accountId <id> --platform instagram --name "Summer Sale" --message "Check out our deals!"
zernio broadcasts:add-recipients <broadcastId> --useSegment
zernio broadcasts:send <broadcastId>

Commands

Authentication

CommandDescription
zernio auth:loginLog in via browser (creates API key automatically)
zernio auth:set --key <key>Save API key manually
zernio auth:checkVerify API key works

Profiles

CommandDescription
zernio profiles:listList all profiles
zernio profiles:get <id>Get profile details
zernio profiles:create --name <name>Create a new profile
zernio profiles:update <id>Update a profile
zernio profiles:delete <id>Delete a profile

Accounts

CommandDescription
zernio accounts:listList connected social accounts
zernio accounts:get <id>Get account details
zernio accounts:healthCheck account health status

Posts

CommandDescription
zernio posts:createCreate a new post
zernio posts:listList posts
zernio posts:get <id>Get post details
zernio posts:delete <id>Delete a post
zernio posts:retry <id>Retry a failed post

Analytics

CommandDescription
zernio analytics:postsGet post performance metrics
zernio analytics:dailyGet daily engagement stats
zernio analytics:best-timeGet best times to post

Media

CommandDescription
zernio media:upload <file>Upload a media file

Inbox

Manage DM conversations, comments, and reviews across all connected accounts.

CommandDescription
zernio inbox:conversationsList DM conversations
zernio inbox:conversation <id>Get conversation details
zernio inbox:messages <conversationId>Get messages in a conversation
zernio inbox:send <conversationId>Send a DM
zernio inbox:commentsList post comments across accounts
zernio inbox:post-comments <postId>Get comments on a specific post
zernio inbox:reply <postId>Reply to a comment
zernio inbox:reviewsList reviews (Facebook, Google Business)
zernio inbox:review-reply <reviewId>Reply to a review
bash
# List Instagram DMs
zernio inbox:conversations --platform instagram --pretty

# Read messages and reply
zernio inbox:messages <conversationId> --accountId <id>
zernio inbox:send <conversationId> --accountId <id> --message "Thanks for reaching out!"

# Reply to a comment
zernio inbox:reply <postId> --accountId <id> --message "Thank you!" --commentId <commentId>

Contacts

Cross-platform contact CRM with tags, custom fields, and channels.

CommandDescription
zernio contacts:listList contacts
zernio contacts:createCreate a contact
zernio contacts:get <id>Get contact details
zernio contacts:update <id>Update a contact
zernio contacts:delete <id>Delete a contact
zernio contacts:channels <id>List channels for a contact
zernio contacts:set-field <id> <slug>Set a custom field value
zernio contacts:clear-field <id> <slug>Clear a custom field value
zernio contacts:bulk-createBulk create up to 1000 contacts from JSON
bash
# Search contacts
zernio contacts:list --search "john" --tag vip --pretty

# Create a contact with a channel
zernio contacts:create --profileId <id> --name "John Doe" --accountId <id> --platform instagram --platformIdentifier <userId>

# Bulk create from file
zernio contacts:bulk-create --profileId <id> --accountId <id> --platform instagram --file ./contacts.json

Broadcasts

Send bulk messages to contacts across any inbox platform.

CommandDescription
zernio broadcasts:listList broadcasts
zernio broadcasts:createCreate a broadcast draft
zernio broadcasts:get <id>Get broadcast details with stats
zernio broadcasts:update <id>Update a broadcast (draft only)
zernio broadcasts:delete <id>Delete a broadcast (draft only)
zernio broadcasts:send <id>Send a broadcast immediately
zernio broadcasts:schedule <id>Schedule a broadcast for later
zernio broadcasts:cancel <id>Cancel a broadcast
zernio broadcasts:recipients <id>List broadcast recipients
zernio broadcasts:add-recipients <id>Add recipients to a broadcast
bash
# Create and send a broadcast
zernio broadcasts:create --profileId <id> --accountId <id> --platform instagram --name "Product Launch" --message "We just launched something new!"
zernio broadcasts:add-recipients <broadcastId> --contactIds <id1>,<id2>,<id3>
zernio broadcasts:send <broadcastId>

# Schedule a WhatsApp broadcast with a template
zernio broadcasts:create --profileId <id> --accountId <id> --platform whatsapp --name "Order Update" --templateName "order_confirmation"
zernio broadcasts:schedule <broadcastId> --scheduledAt "2025-06-01T10:00:00Z"

# Check delivery status
zernio broadcasts:recipients <broadcastId> --status delivered --pretty

Sequences

Drip campaign sequences with timed message steps and automatic enrollment.

CommandDescription
zernio sequences:listList sequences
zernio sequences:createCreate a sequence
zernio sequences:get <id>Get sequence details with steps
zernio sequences:update <id>Update a sequence
zernio sequences:delete <id>Delete a sequence
zernio sequences:activate <id>Activate a sequence
zernio sequences:pause <id>Pause a sequence
zernio sequences:enroll <id>Enroll contacts into a sequence
zernio sequences:unenroll <id> <contactId>Unenroll a contact
zernio sequences:enrollments <id>List enrollments
bash
# Create a welcome sequence (steps defined in JSON file)
zernio sequences:create --profileId <id> --accountId <id> --platform instagram --name "Welcome Series" --stepsFile ./steps.json

# steps.json example:
# [
#   {"order": 1, "delayMinutes": 0, "message": {"text": "Welcome! Thanks for connecting."}},
#   {"order": 2, "delayMinutes": 1440, "message": {"text": "Here are some tips..."}},
#   {"order": 3, "delayMinutes": 4320, "message": {"text": "Check out our latest content!"}}
# ]

# Activate and enroll contacts
zernio sequences:activate <sequenceId>
zernio sequences:enroll <sequenceId> --contactIds <id1>,<id2>

# Monitor enrollments
zernio sequences:enrollments <sequenceId> --status active --pretty

Automations

Comment-to-DM automations for Instagram and Facebook. Auto-DM users who comment specific keywords on your posts.

CommandDescription
zernio automations:listList comment-to-DM automations
zernio automations:createCreate an automation
zernio automations:get <id>Get automation details with recent logs
zernio automations:update <id>Update an automation
zernio automations:delete <id>Delete an automation and all logs
zernio automations:logs <id>List trigger logs
bash
# Auto-DM anyone who comments "info" or "link"
zernio automations:create \
  --profileId <id> --accountId <id> \
  --platformPostId <igPostId> \
  --name "Lead Magnet" \
  --keywords "info,details,link" \
  --dmMessage "Here's the link you asked for: https://example.com" \
  --commentReply "Check your DMs!"

# Trigger on ALL comments (no keyword filter)
zernio automations:create \
  --profileId <id> --accountId <id> \
  --platformPostId <igPostId> \
  --name "Engagement Boost" \
  --dmMessage "Thanks for engaging! Here's a special offer..."

# Disable an automation
zernio automations:update <automationId> --isActive false

# View trigger logs
zernio automations:logs <automationId> --status sent --pretty

Configuration

The CLI stores settings in ~/.zernio/config.json. You can also use environment variables:

VariableDescriptionRequired
ZERNIO_API_KEYYour API keyYes
ZERNIO_API_URLCustom API endpointNo

Environment variables override the config file.

Supported Platforms

Instagram, TikTok, X (Twitter), LinkedIn, Facebook, Threads, YouTube, Bluesky, Pinterest, Reddit, Snapchat, Telegram, and Google Business Profile.

  • GitHub Repository
  • ClawHub Repository
  • npm Package
  • SDKs
  • Zernio Dashboard