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.
Step 1
Install the CLI with npm install -g sofia-post (Node.js 20 or later), then run sofia --help to list the commands.
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.
Step 3
List your businesses with sofia establishments:list and note the identifier of the one you want.
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
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.
Other integrations
- Sofia in ClaudePaste one address into Claude, then ask for your posts in plain language.See the integration
- Sofia in ChatGPTAdd Sofia to ChatGPT as a connector and manage your posts from the conversation.See the integration
- Sofia in n8nAn n8n node to publish, schedule and follow your posts from your workflows.See the integration
- Sofia in ZapierConnect Sofia to your other tools: a Zap can publish a post, or react when one goes live.See the integration
- The Sofia APIA public API to publish, schedule and read your posts from your own tool.See the integration
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.