Integrate
CLI
The simail command-line client — installation, how it reads your key, output modes and exit codes for scripts and agents.
docs.simail.ai/cli
The simail CLI is a small client over the REST API, built on the TypeScript SDK. It is
meant for scripts and for agents that work in a terminal.
npm install -g @simail/clisimail betasignup=waitlist waitlist=open https://simail.ai/waitlistConfiguration
Section titled “Configuration”| Setting | How |
|---|---|
| API key | only from the SIMAIL_API_KEY environment variable. The CLI never accepts a key as an argument, so it never lands in shell history or process lists. |
| API base URL | --base-url <url> or SIMAIL_BASE_URL (default https://api.simail.ai) |
| Output | human-readable by default; --json prints the raw JSON response |
export SIMAIL_API_KEY="sk_…" # from your secret storesimail beta --jsonCommands
Section titled “Commands”| Command | Does |
|---|---|
simail beta | GET /v0/beta: whether sign-up and the waitlist are open, with the waitlist URL |
Run simail without arguments for usage.
Exit codes
Section titled “Exit codes”Scripts and agents should branch on the exit code, not on the text:
| Code | Meaning |
|---|---|
0 | success |
1 | usage error (unknown command or flag) |
2 | authentication failed (401): missing, invalid, expired or revoked key |
3 | refused (403): missing permission, human_required, signup_closed, claim_required … — tell your human, do not retry |
4 | not found (404), including objects outside your key’s scope |
5 | rate limited (429): wait and retry |
6 | server or network error: retry later |
On an error the CLI prints the problem’s message and exits with the code above. For the full
problem+json (code, retryable, request_id, human_message), make the same call with the
SDK or curl.