Skip to the documentation
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 login in 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_KEY or --api-key. Profiles hold several sign-ins on one machine, whoami and status show one, and logout ends it.
  • Verification codes: a browser sign-in is asked for the code the web app asks for before a sensitive change, and nextmail verify asks for it ahead of time for the next 60 minutes. An API key never needs one.
  • Mail: send with attachments, scheduling, an undo window, templates and translation, inbox, search, read and reply, and archive, trash, star, mark, snooze and label on several threads at once.
  • Disposable inboxes with temp new, list, read, watch and delete, with no sign-in.
  • A command for every SDK method, 684 methods as 550 commands in 53 resources, with typed flags, --data from JSON, a file or standard input, paging with --all, --max and --ndjson, and downloads with --out. nextmail api calls any REST endpoint with the same sign-in.
  • AI: ai translate and ai languages for translation, ai compose to write a body in your own style, and ai summarize for the summary of a thread.
  • MCP: mcp config for Claude Code, Claude Desktop, Cursor, VS Code, Windsurf and Codex, mcp serve as a local stdio bridge, and mcp tools and mcp call.
  • nextmail agents prints a guide for AI agents and CI scripts, in Markdown or as JSON.
  • docs ask, docs open and docs read for the documentation, and open for the pages of the web app.
  • Scripting: --json with an error envelope on stderr, stable exit codes, --no-input, --yes for destructive changes, --dry-run on every command but mcp serve, and --help --json for 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: ~/.nextmail is readable by you alone, saved tokens are never printed, text from the server is cleaned before it reaches the terminal, plain http is 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=1 turns off.