Integration

Publish from your terminal

The Sofia CLI puts the Sofia API in a single command, sofia. Each command is written resource:action and answers in JSON, which you can chain with jq, a cron job or your CI. It needs no extra dependency, and you sign in through your browser or with a personal key: handy for automating your publishing.

What you can do

  • Publish, schedule, list, edit and delete posts with sofia posts:create, posts:list, posts:get, posts:update and posts:delete.
  • Upload a photo or a video to the media library with sofia media:upload, then find it again with media:list.
  • Read a business's statistics with sofia insights:get, over the period of your choice.
  • Chain every JSON answer with jq, a cron job or a CI pipeline to automate your publishing.
How to connect it
  1. Step 1

    Install the CLI with npm install -g sofia-post (Node.js 20 or later), then run sofia --help to list the commands.

  2. Step 2

    Sign in with sofia auth:login, which opens your browser; for a script or CI, export a personal key in SOFIA_API_KEY instead.

  3. Step 3

    List your businesses with sofia establishments:list and note the identifier of the one you want.

  4. Step 4

    Publish or schedule with sofia posts:create, giving the business, the networks and the text.

A command to schedule a post

sofia posts:create -e <establishmentId> -p instagram,facebook -c "Tarte tatin du jour" -m <mediaId> -s 2026-12-10T10:00:00Z

Questions

Still have a question?

Answers to the questions we hear most.

ContactA question or a demo? The team answers quickly.
  • Where does the CLI keep my sign-in?

    The credentials obtained with sofia auth:login are kept in the file ~/.sofia/credentials.json on your machine and take precedence over SOFIA_API_KEY. To point the CLI at another instance of the API, use SOFIA_API_URL. Your password is never typed into the CLI: you approve the access on Sofia's consent page, in the browser.

  • What does the CLI return when a command fails?

    Every command writes its result as JSON on standard output, so you can pass it to jq. When something fails, the error is JSON written on the error output and the exit code is 1: a script or a scheduled task can therefore detect the failure and react, without parsing free text.

  • Can I manage webhooks with the CLI?

    Yes: sofia webhooks:create, webhooks:list, webhooks:delete and webhooks:test register, list, delete and test your webhooks. The browser sign-in does not cover these commands: use a personal key, created in Sofia and exported in SOFIA_API_KEY. A webhook tells another system when a post goes live or fails.

Start with Sofia, connect later

The connector for AI assistants is included in every plan, the free one too. Create your account, connect your networks, then plug in the tool you prefer.

Free, no credit cardYour real photosCancel in one click