Every command group in the OpenEmail CLI, the global flags available on all of them, and the output conventions for scripting.

Every command group in the OpenEmail CLI. The authoritative source is always the binary itself.

Run openemail <command> --help for the full flag list of any group, and openemail version to confirm what you are running.

Command groups

CommandWhat it does
accountsManage tenant accounts (system callers only for create/list)
adminOperator-only maintenance (system credentials required)
apiCall any core API route directly (escape hatch)
completionGenerate the shell autocompletion script
credentialsManage a mailbox's IMAP/SMTP credentials
deliverMTA-facing delivery: RCPT pre-flight check and test inbound injection
domainsManage domains
keysManage API keys
labelsManage a mailbox's labels (IMAP folders)
loginAuthenticate and store an API key for this profile
logoutRevoke this profile's key and remove stored credentials
mailboxesManage mailboxes
messagesList, read, append, flag, label, and delete a mailbox's messages
patternsManage pattern routes (local-part globs)
pickupsManage a mailbox's POP3 pickup sources
routesManage address routes
searchFull-text search a mailbox's messages
sendSubmit an outbound message
sieveManage a mailbox's Sieve filter scripts (ManageSieve)
statusCheck core reachability and authentication
threadsList and read conversation threads
uiBrowse the platform in an interactive console
upgradeExplain how to upgrade (openemail does not self-update)
versionPrint the CLI version
watchTail a mailbox's live change events over WebSocket
whoamiShow the identity the current key resolves to

Profiles

A profile is a named CLI configuration with its own API URL, account, and default mailbox. Use profiles to keep production and staging apart, and --profile to pick one for a single command.

Interactive console

openemail ui

ui opens a full-screen terminal client rather than printing and exiting. It uses the current profile's credentials, so sign in first. See the Quickstart.

It is the fastest way to look around: browse mailboxes, read threads and messages, and inspect routes, patterns, and domains. It is also a working client, so you can create mailboxes and send and receive mail from inside it.

Reach for it when you are exploring or doing one-off work by hand, and for the individual commands when you are scripting. The console paints a screen instead of emitting text, so unlike every other command here it cannot be piped into another program.

Global flags

Available on every command.

FlagWhat it does
--api-keyUse this bearer token for one invocation (env: OPENEMAIL_API_KEY)
--api-urlOverride the API base URL (env: OPENEMAIL_API_URL)
--debugPrint debug detail on errors
--jsonOutput machine-readable JSON
--no-colorDisable color output
--no-keyringStore keys in a 0600 file instead of the OS keychain (env: OPENEMAIL_NO_KEYRING)
--profileConfig profile to use (env: OPENEMAIL_PROFILE)
-v, --versionPrint the CLI version

Output and scripting

Data goes to stdout so it can be piped. Messages and warnings go to stderr, so they stay visible even when stdout is being consumed by another program.

--json is the bridge between the CLI and the API: the payload it prints is the payload the API returns.

Exit codes: 0 success, 1 error, 2 usage problem, 4 authentication failure.

Defaults worth knowing

openemail mailboxes use <mailboxId|address> sets the default mailbox for the current profile. Message, label, and Sieve commands use it, which is why they work without -m once it is set.

Skipping the default mailbox is the most common reason openemail messages list fails on a fresh install.