Skip to the documentation
CLI

Changelog

Every release of the CLI, newest first.

0.0.5

Commands for automations and contact events, for muting, inbox tabs, reminders, out of office replies and labels that AI applies, for the two sending lanes, the address checker and the dedicated IP add-on, and for importing a live mailbox, a calendar file and a contacts file. Each one comes from a method the SDK gained after 0.0.8.

  • nextmail automations create --name <value> makes a draft automation, from --starter <slug>, from --definition <json|@file|-> or empty, with --settings-timezone, --settings-send-window, --settings-reentry-days, --settings-exit-on-leave and --settings-list-audience-id. nextmail automations list (with --status), get <id>, update <id> and delete <id> manage them, and list-starters prints the ready-made definitions.
  • nextmail automations publish <id> saves the draft as the next version and turns the automation on, pause <id> stops it without losing anybody, resume <id> turns it back on, archive <id> retires it for good and duplicate <id> copies it into a new draft. publish, resume and archive ask before they run, and --yes skips the question. A draft that cannot run is refused with invalid_automation, and the error lists every problem that blocks it.
  • nextmail automations send-test <id> --step-key <value> sends the email of one step to your account address, or to --to <value>. list-versions <id> and restore-version <id> <version> read the published versions and copy one back into the draft, and stats <id> (with --since and --until) prints the totals, the numbers of each step and a daily series.
  • nextmail automations list-enrollments <id> (with --status, --step-key and --q) lists the contacts in an automation, get-enrollment <id> <enrollment-id> shows what each step did for one of them, enroll <id> --email <value> puts a contact in, with --body-data for the values its steps read, and exit-enrollment <id> <enrollment-id> takes one out once you confirm.
  • nextmail events send --name <value> --email <value> records that something happened to a contact, with --properties, --occurred-at, --create-contact, --contact-name and --idempotency-key, and it starts the live automations whose trigger names the event and ends the waits that were holding out for it. nextmail events send-batch <events> records up to 100 from JSON, inline or from a file with @path, and reports per event. events list-names prints the event names the workspace has seen, and nextmail contacts list-events <email> (with --name) lists the events of one contact.
  • Reading automations needs automations:read and every change needs automations:write, and publish, resume and send-test also need emails:send. Sending events needs contacts:write, reading the events of a contact needs contacts:read, and events list-names needs automations:read.
  • nextmail threads mute <id> mutes a conversation, as Mute does in the app: a thread in the inbox moves to the archive, and new mail in it goes straight to the archive, unread, with no push, sound or desktop notice. nextmail threads unmute <id> takes the mute off. Muting is for the whole workspace, and is:muted finds muted threads in --query.
  • nextmail threads list --category <tab> reads one inbox tab, primary, promotions, updates, social or forums, and nextmail threads counts prints categories, the conversations and unread conversations of the inbox in each tab. nextmail threads list-sender-categories lists the senders whose mail always goes to one tab, set-sender-category <email> <category> saves a choice and moves that sender’s inbox threads into the tab, and clear-sender-category <email> removes one once you confirm.
  • nextmail follow-ups set --thread-id <value> --remind-at <when> asks for a thread to come back to the top of the inbox, unread, if nobody replies by then. nextmail follow-ups list (with --status, --thread-id and --limit) lists the reminders still waiting and the ones that ended, and cancel <id> cancels one once you confirm. nextmail emails send --follow-up-at <when> sets a reminder as the message goes out, with an instant or a duration such as P3D. Reading needs threads:read and every change needs threads:write.
  • nextmail out-of-office set <address> --message <value> saves the automatic reply of an address, or of a catch-all with *@example.com, with --subject, --starts-at, --ends-at, --contacts-only and --no-enabled to pause it. nextmail out-of-office list reads every reply saved in the workspace, or one with --address, and clear <address> removes one once you confirm. Reading needs settings:read and every change needs settings:write.
  • nextmail labels create and nextmail labels update <id> take --ai-instructions <value>, what the label is for in plain words, and --ai-enabled, which has AI add the label to arriving mail that fits. Turning it on needs instructions and a paid plan, and a workspace may have 10 such labels. nextmail labels test <id> runs the AI over the newest 20 inbox threads and prints the ones the label would catch, without labelling anything, and --ai-instructions tries wording you have not saved yet. It needs labels:write and threads:read and spends one AI action.
  • nextmail settings update takes --inbox-tabs, --primary-only-alerts and --phone-follow-ups (or --no-inbox-tabs and so on): the inbox shown as tabs, alerts only for mail sorted into Primary, and a push when a reminder comes due.
  • nextmail emails send --stream <lane> and nextmail templates send <id> --stream <lane> choose the lane a message travels in: transactional, the default, for mail one person is waiting for, or broadcast for newsletters. Each lane has its own queue and its own reputation.
  • nextmail sending list-streams prints both lanes with their state and their bounce and complaint numbers for the last 7 days. The broadcast lane pauses itself above 4% bounces or 0.2% complaints while app mail keeps going, and nextmail sending resume-stream broadcast resumes it once you confirm. Reading needs emails:read, and resuming needs domains:write, the workspace owner and, with a browser sign-in, a verification code.
  • nextmail tools check-address <email> says whether an address is worth sending to: valid, risky, invalid or unknown, with the reasons and a correction for a likely typo. nextmail tools check-addresses --emails <a,b> checks up to 100 in one call. --deep also asks whether each mailbox exists, billed per address through pay as you go, and needs emails:send.
  • nextmail billing list-add-ons says whether a dedicated sending IP is for sale, what it costs and whether the workspace qualifies, which takes the Business or Enterprise plan and 100,000 emails sent in a month. nextmail billing start-add-on-checkout --add-on dedicated-ip prints the link where the person pays, and nextmail billing cancel-add-on dedicated-ip ends it at the end of the month already paid for, once you confirm. nextmail sending list-dedicated-ips and get-dedicated-ip <ip> print each IP with its status and how far its warm-up is.
  • nextmail domains get-mail-app-settings <id> <address-id> prints smtpSubmission, the SMTP server on port 587 for apps and devices that only offer STARTTLS, beside the port 465 server.
  • nextmail imports discover-mailbox <email> finds the mail server for an old address and says what the mailbox signs in with. nextmail imports check-mailbox --email <value> --password <value> signs in once and prints the folders and how many messages an import would bring, and nextmail imports connect-mailbox --address-id <value> --email <value> --password <value> starts copying the mailbox into one address, with --contacts and --calendars to bring those across too and --host, --port, --security and --username when the server is not found from the address.
  • nextmail imports resume <id> carries on an import that waits, with --password when the old password stopped working. Pass --password - to read the password from standard input or --password @path to read it from a file, so it stays out of your shell history, and --dry-run never prints it. These commands need threads:write, with contacts:write and calendar:write for those parts.
  • nextmail calendar import-ics <path> and nextmail contacts import-vcf <path> send an iCalendar or vCard file and queue it, - reads the file from standard input, and --filename sets the name it carries in the list of imports in place of the name of the file. nextmail calendar list-imports and nextmail contacts list-imports print the imports with what each added and left out, get-import <id> prints one with its report, and undo-import <id> deletes everything an import added, once you confirm. Reading needs calendar:read or contacts:read, and the rest needs calendar:write or contacts:write.
  • nextmail me list-requests, nextmail me list-activity and nextmail me stats read the request log, the history and the figures of the key you are signed in with, and they need no scope, so a key that can only send can still watch itself. --all walks every page of the two lists, and me stats prints sends only when the key holds emails:read.
  • nextmail keys list-requests <id>, nextmail keys list-workspace-requests and nextmail me list-requests take --statuses 401,403 to keep the calls answered with those exact status codes, and --path /emails/:id to keep the calls to one route, whatever the method. A path that ends in * matches every route that starts with it, so quote it for your shell.
  • A flag whose SDK option is a list of numbers takes them comma-separated or repeated, and refuses anything that is not a number before it sends the request.
  • nextmail tasks create --name <value> --instruction <value> --trigger-kind <kind> saves an instruction for the assistant to run by itself. --trigger-kind is schedule (with --trigger-schedule-cadence, --trigger-schedule-hour, --trigger-schedule-minute, --trigger-schedule-weekdays and --trigger-schedule-timezone), mail (with --trigger-mail-addresses, --trigger-mail-from-contains and --trigger-mail-subject-contains) or manual. --autonomy is ask, organize or reply, and --toolkits, --model, --notify, --max-runs-per-day and --max-steps set the rest. nextmail tasks list (with --status), get <id>, update <id> and delete <id> manage them, and nextmail task is the same command.
  • nextmail tasks run <id> starts a run of a task now, pause <id> stops it from starting runs and resume <id> turns it back on. nextmail tasks start-run --instruction <value> hands the assistant one job to do in the background with no task saved, with --autonomy, --toolkits, --model, --max-steps and --thread-id. list-runs (with --task-id and --status) lists runs, get-run <id> prints one with every step it took, and cancel-run <id> stops it once you confirm.
  • nextmail tasks list-approvals lists what runs are waiting for you to allow (with --task-id, --run-id and --status), and get-approval <id> prints one with the exact arguments. approve <id> lets it happen, with --subject and --body to replace the words of a send or a reply, and deny <id> refuses it. Both ask before they run, and --yes skips the question.
  • Reading tasks needs tasks:read with threads:read and emails:read. Creating, changing, resuming, running and approving need tasks:write with threads:read, threads:write, emails:read, emails:send and labels:write, and the scopes of each toolkit. pause, delete, cancel-run and deny need only tasks:write.

0.0.4

A command for every method the SDK gained in 0.0.8: contact cards, calendar links and events, mail apps, the knowledge base, AI writing, billing, workspaces, exports, forwarding, DNS providers and more, alongside the web app address, the workspace brand and sign-up forms. It carries SDK 0.0.8.

  • nextmail app-host manages the web app address of the workspace. get reads it with its status and the DNS records to publish, set --host sets or replaces it, verify checks it straight away, and delete removes it once you confirm. With a browser sign-in, delete also asks for a verification code.
  • nextmail branding manages the brand of the workspace. get reads it, update changes the fonts and the sign-in background, upload-image <variant> <file> uploads one of the four images, and remove-image <variant> removes one once you confirm.
  • nextmail forms (or form) manages sign-up forms. list, get, create --name, update, publish, pause, resume, duplicate and delete handle the forms, list-starters and get-starter the starting points, and analytics their numbers. list-submissions, get-submission, delete-submission, delete-submissions, approve-submission and resend-confirmation handle what people sent, and subscribe <form-id> --email signs someone up without a key. delete, delete-submission and delete-submissions confirm first, and with a browser sign-in delete also asks for a verification code.
  • login --scopes takes forms:read and forms:write. resend-confirmation, and a change that makes a form send mail, also needs emails:send.
  • nextmail contacts list-cards, get-card, create-card, update-card and delete-card manage the address book as contact cards, with phone numbers, postal addresses, organisation, job title and birthday.
  • nextmail calendar list-feeds, create-feed, reset-feed and delete-feed manage the secret links that publish the calendar, list-subscriptions and the other subscription commands manage the calendars you subscribe to by link, and create-event, update-event, delete-event, cancel-event, respond-to-event and decline-proposal handle events and invitations.
  • nextmail domains get-mail-app-settings, create-app-password, list-app-passwords, update-app-password, delete-app-password, send-mail-app-setup and update-mail-app-settings put an address into a mail, calendar or contacts app and choose the kinds of connection it accepts.
  • nextmail knowledge reaches the knowledge base the AI writes from: its notes, files and links, the suggestions it makes, the duplicate and conflict warnings, the connectors that keep a site or a help center in step, and how often the AI used it.
  • nextmail emails compose, rewrite and suggest-subject write with AI, emails check scores a message before it is sent, emails update changes one that has not gone yet, and nextmail threads reply-suggestions prints the replies suggested under a thread.
  • nextmail search, inbox --query and threads list take --semantic to search by meaning, and threads counts, summary, restore, delete and the note commands do what the mailbox of the app does.
  • nextmail workspaces and account manage your workspaces and your own account, and nextmail billing gives the workspace owner the plan, pay as you go and the invoices.
  • nextmail dns-connections and domains get-dns, set-dns-zone and sync-dns handle the DNS provider accounts linked in the web app. The forwarding, address login, logo and address photo commands on domains manage where an address forwards, the password that signs in as it and the logo inboxes show.
  • nextmail exports, subscriptions, analytics, chats, encryption, senders, support and tools are new, and templates, forms, webhooks, keys, broadcasts, members and files have new commands for images and AI design, event lists and stats, analytics, domain grants and making a file private.
  • nextmail provider-imports moves an account across from SendGrid, Postmark, Mailgun or Mailchimp as well as Resend, and provider-imports create --resend-key is now --provider-key.
  • nextmail settings update has a flag for every setting and takes a whole domain in --address, drafts create --forward-of saves a forward, and domains update takes --sender-name and --dmarc-policy.
  • An email whose recipients all bounced reads bounced, and one that bounced for some of them reads partial. The help for ai summarize no longer says summaries spend AI actions.

0.0.3

Disposable inboxes follow the model the API now runs: the inbox token is the lease, nothing about it is stored on the server, and a message id is a thread id. It carries SDK 0.0.7.

  • temp read with a thr_ message id and no inbox reads that message from your only inbox. It used to take a thr_ id for an inbox and fail.
  • temp-mail extend saves the new token and expiry it returns, as temp-mail create does, so later commands keep reaching the inbox past the old expiry. A running temp watch picks the new token up.
  • temp delete moves the mail to the bin and forgets the token here, while the lease runs on and nothing holds the address. An inbox whose lease has ended is forgotten with a warning instead of failing.
  • temp read no longer warns that a long body was cut, because a body never is, and its help says that reading a message does not mark it seen.
  • temp new --name and --domain describe the rules the server applies, and temp-mail list-attachments prints each attachment's id, file name, type and size.

0.0.2

Fixes to the help and to nextmail docs. It carries SDK 0.0.6, the release it was built with.

  • docs open and docs read take a link to a translated docs page, such as https://openemail.uk/de/docs/cli/commands, and open or read that page.
  • Help keeps its code formatting when a description holds a lone backtick, as the list of characters a local part may use does.
  • A flag that clears a value, such as --tracking-host, --storage-host or --label, says to pass null. It no longer offers an empty string, which the CLI refuses.
  • A list whose JSON has a shape of its own, such as addresses list, no longer claims to print { items, hasMore, nextCursor } with --all, and its help points at what it returns.
  • The first example of an update command, such as domains update, sets a field instead of sending an empty change.
  • A URL given without a scheme, such as localhost:2222, gets one from the same rule the web app and the API use: http for localhost, loopback, private network addresses and .local names, and https for everything else. Plain http is still refused for anything but loopback.

0.0.1

The first release: the whole of Nextmail from a terminal, with a browser sign-in for people and API keys for scripts.

  • Sign-in: nextmail login in the browser, returning to the terminal on its own on a desktop and through a pasted code over SSH or with --no-browser. API keys with --token, --with-token, NEXTMAIL_API_KEY or --api-key. Profiles with profile list, use, current and remove.
  • Access tokens renewed before they run out, one renewal at a time per profile, and refresh tokens that work once: two renewals at the same moment get the same new pair, and an old one used more than 30 seconds after it was replaced makes the server revoke that sign-in’s tokens.
  • A saved sign-in only ever goes to the API it signed in to, and a disposable inbox token only to the API that issued it. Plain http is refused except on localhost, a 127.x.x.x address and ::1, an origin on 0.0.0.0 or [::] is refused whatever the scheme, and a request path that would leave the API origin stops with invalid_path.
  • Verification codes before sensitive changes with a browser sign-in, asked for when a command needs one, or ahead of time with nextmail verify. They cover the REST API and the MCP tools that make the same changes.
  • Each sign-in can ask for 5 codes an hour and 20 a day. Ten wrong codes in 24 hours pause its verification, and so do twenty across all the apps you connected. The CLI says when verification resumes and exits with code 4 and step_up_paused.
  • whoami, status, and logout, which revokes a browser sign-in on the server.
  • Sending with send: text, HTML, a file, stdin or your editor, attachments of any size, scheduling, an undo window, translation, templates and tags.
  • The mailbox: inbox, search, read and reply, and archive, unarchive, trash, star, unstar, mark, snooze, unsnooze and label.
  • Disposable inboxes with temp new, list, read, watch and delete, with no sign-in.
  • A resource command for every method of the SDK: 282 methods as 198 commands in 26 namespaces, with security left out of the help because nextmail verify covers it. Typed flags, --data from JSON, a file or stdin, paging with --all, --max and --ndjson, downloads with --out, and a confirmation before anything destructive.
  • AI: ai translate, ai languages, ai compose and ai summarize.
  • 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, which asks for a verification code and calls the tool again when a tool needs one.
  • nextmail agents, also agent, prints a guide for AI agents such as Claude Code and Codex, and for CI scripts, in Markdown or as JSON with --json. It covers signing in without a person, reading the output, finding commands, changing things safely, verification codes and missing scopes, with the exit codes and five recipes.
  • docs ask, docs open and docs read, open for the pages of the web app, and api for any REST call.
  • Scripting: --json with one document for every list and an error envelope on stderr, NDJSON streams, stable exit codes, --no-input, and CI detection.
  • --dry-run on every command but mcp serve: reads run, then the first request that would change something is printed instead of sent, with the Authorization value and secret fields redacted, and the command exits with code 0. Confirmations are skipped, and a change that stays on this machine, such as profile use, is printed and not saved.
  • --help --json on the root, a group or a command, and nextmail help <command> --json, print the command tree as one JSON document: arguments, flags, the sign-in and scopes each command needs, whether it is destructive, and for a resource command its SDK method and REST call.
  • Every command knows the scopes it always needs. When a saved sign-in lacks one, the command checks with the API once, then stops with exit code 4 and insufficient_scope before it asks anything or sends a request, with the next step for that kind of sign-in. A missing scope reported by the API gets the same next step.
  • Help for every command and group, suggestions for mistyped commands and flags, and completion for bash, zsh and fish.
  • Sign-ins and inbox tokens in ~/.nextmail, readable by you alone and changed under a lock file, and a damaged config.json kept as config.json.bak rather than read as signed out.
  • Text from the server is cleaned before it reaches the terminal, and output piped to a slow reader is written in full before the CLI exits.
  • A daily update notice, which NEXTMAIL_NO_UPDATE_CHECK=1 turns off, and nextmail update.
  • One bundled file with no dependencies, on Node.js 20.12 or later.

Not in this release: billing, workspaces, account security, data export, calendar changes, forwarding, linking a DNS provider and the assistant chat stay in the web app for now. nextmail open takes you to each of them by a page name, such as billing, chats or providers, and nextmail open forwarding <address> opens the forwarding of one address.

Terminal
npm install -g @nextmail/clinextmail loginnextmail inbox