Social media CLI

Social media CLI: post from the terminal or CI

The socifyr CLI is a command-line client for the Socifyr publishing API. Install it with npm, save an API key once, and socifyr post "Hello" --to x-myhandle,linkedin-myhandle --wait publishes to both accounts and prints the per-platform result. The same commands cover media uploads, scheduling, CSV bulk scheduling, status checks, analytics and reconnecting expired accounts across 18 platforms.
13
CLI commands
18
platforms, one key
3
connected accounts on Free
30
free uploads per month

What you get

  • One command to publish

    socifyr post handles text, images and video. It detects the media type and takes slugs from --to.
  • Built for scripts and CI

    Every command accepts --json. Environment variables override the saved config, so a CI job needs no setup step.
  • Bulk scheduling from a CSV

    socifyr schedule posts.csv reads text, connections, scheduledAt and title columns and schedules each row.
  • Fix expired accounts in place

    socifyr connections refresh <slug> renews a token. reconnect <slug> prints a one-time re-authorization link.

Install the socifyr CLI and publish a post

  1. 1

    Install

    Run: npm install -g @socifyr/cli.
  2. 2

    Configure

    Run: socifyr configure --key sk_your_key --workspace <workspaceId>.
  3. 3

    List accounts

    Run: socifyr connections to see your account slugs.
  4. 4

    Publish

    Run: socifyr post "Hello" --to x-myhandle --wait.

How do I install and configure the socifyr CLI?

bash
npm install -g @socifyr/cli
# or: pnpm add -g @socifyr/cli

socifyr configure --key sk_your_key --workspace <workspaceId>
socifyr connections

configure stores the key and workspace ID in ~/.config/socifyr/config.json. The key is saved as plain text, so protect that file. For CI, skip configure and set SOCIFYR_API_KEY and SOCIFYR_WORKSPACE_ID; environment variables always win over the file.

Typical output of socifyr connections
bash
Connections (3)

  instagram-mybrand      Instagram    @mybrand
  x-myhandle             X            @myhandle
  linkedin-myhandle      LinkedIn     Madhav Poudel

How do I post, schedule and check status from the CLI?

bash
# Text to two accounts, wait for the per-platform result
socifyr post "Just shipped v2" --to x-myhandle,linkedin-myhandle --wait

# Image or video from disk (type is detected)
socifyr post "Behind the scenes" --media video.mp4 --to tiktok-me,instagram-me --wait

# Schedule for a future ISO 8601 time (paid plans)
socifyr post "Launch day" --to linkedin-myhandle --at 2026-12-01T09:00:00Z

# Save a draft, publish it later
socifyr post "Draft copy" --to x-myhandle --draft
socifyr publish <id> --wait

# Check or retry
socifyr status <id> --wait
socifyr retry <id> --wait

Scheduling is a paid-plan feature. A scheduled post sits in the queue until its time arrives; there is no separate "scheduled" status. Details in how to schedule social media posts with an API.

Bulk scheduling: header is text,connections,scheduledAt,title
bash
socifyr schedule posts.csv

What commands does the CLI have?

socifyr CLI command reference
CommandPurpose
socifyr configureSave the API key, workspace ID and optional --api-url. --show prints the current config.
socifyr connectionsList connected accounts and slugs. --json for scripts.
socifyr connections refresh <slug>Renew an account token without re-authorizing.
socifyr connections reconnect <slug>Print a one-time link to re-authorize an account.
socifyr post [text]Publish text, images or video. Flags: --to, --media, --media-id, --file, --format, --at, --ai, --draft, --wait, --json.
socifyr schedule <file.csv>Bulk-schedule text posts from a CSV.
socifyr status <id>Show the status of a post. --wait polls until it finishes.
socifyr publish <id>Publish a saved draft.
socifyr retry <id>Retry the failed channels of a post.
socifyr edit <id>Edit a draft or scheduled post: text, title, schedule, target accounts or media.
socifyr mediaSubcommands list, upload <file>, get <id> and delete <ids...> for the media library.
socifyr analytics followersFollower growth per account. accounts compares accounts side by side.
socifyr usageCurrent usage against your plan limits.

How do I renew an expired account from the terminal?

bash
socifyr connections refresh instagram-mybrand
# If the platform cannot refresh:
socifyr connections reconnect instagram-mybrand

reconnect prints a link that works once and expires after 10 minutes. The workspace owner opens it and approves the same account. The slug and scheduled posts are kept. Open the link yourself instead of pasting it into a chat app, because link-preview bots can use up a single-use link.

Frequently asked questions

What is a social media CLI?

A command-line tool that publishes to social accounts. With socifyr you run one command and the post goes to every account you name, from a terminal, a cron job or a CI pipeline.

How do I post to several platforms at once from the command line?

Pass comma-separated slugs to --to, for example socifyr post "Hello" --to x-myhandle,linkedin-myhandle,bluesky-myhandle-bsky-social. List your slugs with socifyr connections.

Can I use the CLI in GitHub Actions or other CI?

Yes. Install @socifyr/cli, set SOCIFYR_API_KEY and SOCIFYR_WORKSPACE_ID as secrets, and run socifyr post ... --wait. Add --json to parse results.

How does the CLI generate captions?

Add --ai to socifyr post to generate platform-specific captions. AI features use your own provider key (bring your own key).

Can the CLI connect a new account?

New accounts are connected in the dashboard. The CLI can refresh an existing connection or give you a link to re-authorize it.

Related

Put social media cli to work

One key, 18 platforms, flat pricing from $9.99. The free plan needs no card.