Brainy Canvas Docs
Brainy Canvas CLI
Install the Brainy Canvas CLI, sign in once with an API key, then generate durable media or create and run canvas workflows from the terminal.
The CLI wraps the Brainy Canvas API in direct terminal commands. It is useful for local automation, demos, scripts, and quick workflow runs.
Installable package
@brainycanvas/cli from npm and run commands through the brainy binary.Direct commands
Same canvas engine
Install
npm install -g @brainycanvas/cli
brainy --helpSign in
- Sign in to Brainy Canvas.
- Open the account menu and choose API keys.
- Create a key for your terminal.
- Save it with the CLI.
brainy login --key bc_live_...
# For local development:
brainy login --key bc_live_... --base-url http://localhost:3001Create and run a workflow
brainy projects create "Launch storyboard"
brainy nodes add PROJECT_ID text --text "Draft a product launch storyboard"
brainy nodes add PROJECT_ID chat --model gpt-4o-mini
brainy connect PROJECT_ID TEXT_NODE_ID CHAT_NODE_ID
brainy run PROJECT_ID
brainy runs watch RUN_IDGenerate durable media
Media commands use the asynchronous generation API. Model discovery is read-only; create, edit, and animate commands reserve credits before work is queued. Always supply an idempotency key from automation.
brainy media models --kind image
brainy media generate \
--kind image \
--preset campaign-image \
--prompt "A premium studio photo of a cobalt travel bottle" \
--aspect-ratio 4:5 \
--idempotency-key fall-launch-hero-v1
brainy media watch GENERATION_IDFor edits and animation, pass an input array as JSON. Upload private source files through the REST upload endpoint first.
brainy media edit \
--preset localized-image \
--prompt "Translate the headline and CTA" \
--aspect-ratio 1:1 \
--inputs '[{"url":"UPLOAD_URL","mimeType":"image/png","role":"sourceCreative"}]' \
--parameters '{"targetLocale":"fr-CA","preserveLayout":true}' \
--idempotency-key localized-fr-ca-v1Useful commands
brainy node-typeslists available node types.brainy projects listlists your projects.brainy projects get PROJECT_IDreads a canvas.brainy nodes list PROJECT_IDlists nodes.brainy output PROJECT_IDreads workflow output.brainy projects list --jsonprints JSON for scripting.brainy media get GENERATION_IDreads status and outputs.
API keys remain available for direct REST calls. Agent apps should use the browser sign-in flow instead.