Use from an AI agent
Any assistant that can run terminal commands can use the Simplified CLI. Install it in the environment where that assistant runs, authenticate there, and give the assistant a clear outcome and workspace context.
Start with discovery
A reliable workflow first identifies the resources it needs:
- Run
auth:whoamiandteamspace:currentto confirm scope. - Use
accounts:listfor social tasks,brandkit:listfor brand work, orprojects:list --type ...for project work. - For generation, query the model catalog and inspect the selected capability’s fields.
- Save returned identifiers and verify the result after a write.
Social account IDs are needed for posts and analytics, not for every command. Avoid selecting the first account automatically when several are available.
Read command output
In 1.8.0, output is not uniformly JSON-only. Social and analytics commands can print a heading before a JSON payload; authentication and teamspace commands also include human-readable output. AI generation and several asset, brand, and project commands print JSON directly. There is no global JSON-only flag in this release. Errors and waiting progress are written to stderr.
For a command that emits one JSON object or array after an optional heading, save
stdout and extract the trailing JSON explicitly. Create extract-json.cjs:
Then capture and validate an account response:
Inspect the actual response shape before extracting IDs. This helper is for a single trailing JSON payload, not commands that print multiple data blocks such as some task-progress views. Preserve stderr separately when diagnosing errors.
Example: generate a visual and create a draft
This Bash script requires jq, a verified account ID, and an image model whose
prompt capability supports a 1:1 aspect ratio. Set SIMPLIFIED_ACCOUNT_ID and
SIMPLIFIED_IMAGE_MODEL before running it. Confirm the active workspace first.
The image generation command’s successful waiting result is a JSON array. The post command’s output is saved as text because it includes a heading. Review the created draft before choosing a publishing action.
Track asynchronous work
For durable jobs, submit without --wait and persist the response immediately.
A script can then resume polling after a restart. A waiting timeout does not
mean the server cancelled the work.
Handle retries deliberately
Check the command’s exit status before using its output. Retry reads after a transient error with a bounded delay. Before retrying a create, schedule, upload, or generation request, inspect whether the first attempt succeeded; rerunning it may duplicate content or spend additional credits.
For CI, inject the API key through your secret manager and use an explicit
--teamspace where appropriate. Keep generation results and content IDs as job
artifacts, but exclude credentials. See authentication precedence
when a saved profile is present.
