CLI
Changelog
Every release of the CLI, newest first.
0.0.1
The first release of @nextmail/cli, the official command line. The nextmail command reaches your mailbox and every API operation from a terminal or a script. It is one bundled file with no dependencies, needs Node.js 20.12 or later, and carries the SDK it was built with, so every command sends exactly the request the SDK documents.
- Sign-in:
nextmail loginin the browser, which comes back to the terminal by itself on a desktop and takes a pasted code over SSH or with--no-browser, or an API key with--with-token,NEXTMAIL_API_KEYor--api-key. Profiles hold several sign-ins on one machine,whoamiandstatusshow one, andlogoutends it. - Verification codes: a browser sign-in is asked for the code the web app asks for before a sensitive change, and
nextmail verifyasks for it ahead of time for the next 60 minutes. An API key never needs one. - Mail:
sendwith attachments, scheduling, an undo window, templates and translation,inbox,search,readandreply, andarchive,trash,star,mark,snoozeandlabelon several threads at once. - Disposable inboxes with
temp new,list,read,watchanddelete, with no sign-in. - A command for every SDK method, 684 methods as 550 commands in 53 resources, with typed flags,
--datafrom JSON, a file or standard input, paging with--all,--maxand--ndjson, and downloads with--out.nextmail apicalls any REST endpoint with the same sign-in. - AI:
ai translateandai languagesfor translation,ai composeto write a body in your own style, andai summarizefor the summary of a thread. - MCP:
mcp configfor Claude Code, Claude Desktop, Cursor, VS Code, Windsurf and Codex,mcp serveas a local stdio bridge, andmcp toolsandmcp call. nextmail agentsprints a guide for AI agents and CI scripts, in Markdown or as JSON.docs ask,docs openanddocs readfor the documentation, andopenfor the pages of the web app.- Scripting:
--jsonwith an error envelope on stderr, stable exit codes,--no-input,--yesfor destructive changes,--dry-runon every command butmcp serve, and--help --jsonfor the whole command tree with the scopes each command needs. - When a saved sign-in lacks a scope a command needs, the command checks with the API once, then stops before it sends the request and says what to do next.
- Safety:
~/.nextmailis readable by you alone, saved tokens are never printed, text from the server is cleaned before it reaches the terminal, plainhttpis refused except on this machine, and anything destructive asks first. - Help for every command, suggestions for mistyped commands and flags, completion for bash, zsh and fish, and a daily update notice that
NEXTMAIL_NO_UPDATE_CHECK=1turns off.
Google Workspace