Knowledge base
Command line
Your mailbox and every API operation, from a terminal or a script.
Details
- The
openemailcommand, installed from npm as@openemail/cli. It is one file with no dependencies and needs Node.js 20.12 or later.npm i -g @openemail/cliinstalls it, andnpx @openemail/cli <command>runs it without an install. - There are two ways to sign in.
openemail loginopens your browser, where you pick the workspace, the permissions and how long the access lasts, and each browser sign-in is a connected app you can remove under Account → Connected apps. An API key, saved withopenemail login --with-tokenor set asOPENEMAIL_API_KEY, never opens a browser and never asks for a code, which suits scripts and CI. - A browser sign-in acts as you, so a sensitive change, such as adding a webhook or removing a domain, asks for the same verification code the web app asks for. One code covers that sign-in for 60 minutes, and
openemail verifyasks for it before a script runs. inbox,search,read,replyandsendwork the mailbox the way the app does, with the same search syntax, attachments, scheduled sends, undo and translation.archive,star,snoozeand the other thread actions take several thread ids at once.- Every method of the SDK is a command,
openemail <resource> <verb>, so anything the REST API can do, the command line can do.openemail apicalls any path directly, with the same sign-in. ai translate,ai composeandai summarizebring the AI features to the terminal.openemail mcp configprints the setup for Claude Code, Claude Desktop, Cursor, VS Code, Windsurf and Codex, andopenemail mcp servelets such a client reuse the sign-in of the command line.- It is made for scripts: data goes to stdout and everything else to stderr,
--jsonprints only JSON,--allwalks every page of a list, each kind of failure has its own exit code, and nothing prompts in CI or without a terminal.openemail tempmakes a disposable inbox with no account and no key, andtemp watch --firstwaits for its first message. - What is missing: billing, creating and switching workspaces, account security, data export, writing calendar events, forwarding and linking a DNS provider need a browser session, so the command line does not do them yet, and
openemail openopens the right page of the web app instead. Like the SDK, it has no release workflow, so a version reaches npm when somebody publishes it.