Skip to content
simailDocsv0

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/cli
simail beta
signup=waitlist waitlist=open https://simail.ai/waitlist
SettingHow
API keyonly 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)
Outputhuman-readable by default; --json prints the raw JSON response
export SIMAIL_API_KEY="sk_…" # from your secret store
simail beta --json
CommandDoes
simail betaGET /v0/beta: whether sign-up and the waitlist are open, with the waitlist URL

Run simail without arguments for usage.

Scripts and agents should branch on the exit code, not on the text:

CodeMeaning
0success
1usage error (unknown command or flag)
2authentication failed (401): missing, invalid, expired or revoked key
3refused (403): missing permission, human_required, signup_closed, claim_required … — tell your human, do not retry
4not found (404), including objects outside your key’s scope
5rate limited (429): wait and retry
6server 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.