Skip to main content
The PostlyBee CLI is intentionally JSON-first. Human-readable output is formatted with indentation; --raw-json emits one compact line for jq, log processors, and AI-agent tool adapters.

JSON input

Commands that accept complex payloads require exactly one input source:
Pipelines can generate payloads without temporary files:

CI configuration

Store credentials in masked CI secrets instead of committing the credentials file:
Then run a deterministic command:

Exit codes and errors

Successful commands exit with 0. Authentication, validation, permission, provider, and network errors exit with 1 and print JSON:
For 429 Too Many Requests, use retryAfter to delay the next attempt. Avoid immediate retry loops that consume the Workspace allowance.

Self-hosted automation

The CLI talks only to the Public API. It never connects directly to PostgreSQL, Redis, Temporal, or internal NestJS services, so the same package works with PostlyBee Cloud and compatible self-hosted deployments.

AI agents

Agents can call the CLI as a subprocess and parse --raw-json. Use read-only Token scopes during discovery, require human confirmation before publishing, and issue a separate write Token only to the execution environment that needs it. For clients with native MCP support, prefer the MCP integration instead of wrapping shell commands.
Last modified on August 26, 2026