CLI
The `openemail` command: your mailbox and every API operation, from a terminal or a script.
What it is
One command for everything OpenEmail does outside the browser. It reads, searches, sends and files mail, runs every operation of the REST API, translates, writes and summarises mail with AI, and connects MCP clients such as Claude and Cursor to your mailbox. It is a single file with no dependencies, and runs on Node.js 20.12 or later on macOS, Linux and Windows.
npm install -g @openemail/cliOr run it without installing anything: npx @openemail/cli <command>.
A 60-second tour
openemail loginopenemail statusopenemail inbox --unreadopenemail read CAHk7pQ2x9LmZ4openemail reply CAHk7pQ2x9LmZ4 --text "Thursday works for me."openemail send --to [email protected] --subject "Lunch?" --text "Thursday at noon?"openemail search invoice from:ada has:pdfopenemail domains listopenemail mcp config --client claude-codeloginopens your browser, where you choose the workspace and what the CLI may do, and saves the sign-in.statusshows who you are, the addresses you can send from and the state of each domain.inbox,read,reply,sendandsearchwork the mailbox the way the app does.domains listis a resource command. Every method of the SDK has one, so anything the API can do, the CLI can do.mcp configprints what to add to an AI client so it can use your mailbox.
Two ways to sign in
| Command | What it saves | Verification codes |
|---|---|---|
| openemail login | A browser sign-in, for a person at a terminal. It acts as you, limited to what you approve, and can use the AI tools and the MCP server. | Asked before a few sensitive changes, as in the web app |
| openemail login --with-token | An API key, for scripts, CI and servers. It acts with the scopes of the key. | Never asked |
What it does not do yet
A few things need a browser session, so in 0.0.1 only the web app does them: billing, creating and switching workspaces, account security, data export, writing calendar events, forwarding, and linking a DNS provider. openemail open takes you to the right page, signed in as whoever is signed in to that browser.
openemail open billingopenemail open security --print