Use case
A social media CLI for posting from your terminal and CI
The Socifyr CLI posts to social media from a shell. After socifyr configure, a single socifyr post command publishes text, images or video to any of your connected accounts, schedules it with --at, and can wait for per-platform results with --wait. Add --json and it becomes a building block for shell scripts, cron jobs and CI pipelines.
GitHub Actions stepTerminal
How it works
- 1
Install and configure
Install @socifyr/cli with pnpm or npm, then run socifyr configure with your key and workspace. In CI, set SOCIFYR_API_KEY and SOCIFYR_WORKSPACE_ID instead. - 2
Post from text, a file or media
Pass the caption inline or read it from a file with --file. Attach local files with --media, or reuse library IDs and public URLs with --media-id. - 3
Schedule, draft or let AI write it
Use --at for a schedule, --draft to save without publishing, and --ai to generate platform-specific captions. - 4
Operate on existing posts
status, publish, edit and retry take a post ID. connections, media, usage and analytics round out the toolbox.
Working code
# .github/workflows/announce.yml (step)
- name: Announce release
env:
SOCIFYR_API_KEY: ${{ secrets.SOCIFYR_API_KEY }}
SOCIFYR_WORKSPACE_ID: ${{ secrets.SOCIFYR_WORKSPACE_ID }}
run: |
npx -y @socifyr/cli post "Released ${{ github.ref_name }}" \
--to x-mybrand,linkedin-mybrand --waitnpm install -g @socifyr/cli
socifyr configure --key sk_your_key --workspace your_workspace_id
socifyr post "Release v2.0 is out" --to x-mybrand,linkedin-mybrand --wait
socifyr post --file ./announcement.md --media ./hero.png --to instagram-mybrand
socifyr status <post-id>
socifyr retry <post-id> --waitReplace sk_your_key and the workspace ID with your own from the dashboard, and use your own connection slugs.
Who this is for
Developers who live in the terminal
Announce a release without leaving the shell.CI/CD pipelines
Post on tag, deploy or incident resolution with one step.Cron jobs and shell scripts
Output as JSON and pipe it into jq or your own tooling.
Frequently asked questions
How do I authenticate the CLI?
Run socifyr configure --key sk_... --workspace <id>, or set SOCIFYR_API_KEY and SOCIFYR_WORKSPACE_ID. The environment variables take precedence over the saved config.
Can I post images and video from the CLI?
Yes. --media accepts local file paths and detects image versus video. --media-id accepts media library IDs or public URLs so you can skip re-uploading.
Does the CLI work in GitHub Actions or other CI?
Yes, it needs only Node and two environment variables. Use npx -y @socifyr/cli to avoid a global install.
How do I get machine-readable output?
Add --json to post, status, schedule and other commands for JSON on stdout.
Can I bulk schedule from a file?
Yes. socifyr schedule posts.csv reads text,connections,scheduledAt,title and schedules each row.