Skip to the documentation
CLI

Changelog

Every release of the CLI, newest first.

0.1.0

  • nextmail calendar list-todos, get-todo, create-todo, update-todo and delete-todo work with your to-dos. list-todos takes --calendar-ids, --state (open, done or all), --due-before and --due-after, and --all walks every page. create-todo and update-todo take --title, --due and --start (a day as YYYY-MM-DD or a moment), --status, --priority, --categories, --parent-id, --recurrence and the rest, and update-todo --status COMPLETED checks one off.
  • nextmail calendar list-calendars --kind todos lists your to-do lists, and create-calendar --kind todos makes one.
  • nextmail calendar delete-calendar sends a cancellation to the guests of every upcoming meeting you organised in the calendar, as cancel-event does, and prints how many in cancelledMeetings. --no-notify-guests deletes it without telling anyone.
  • nextmail calendar list-calendar-logins, create-calendar-login, revoke-calendar-login and create-calendar-login-profile-link manage calendar sign-ins: logins that belong to a person, not to an address, and sign calendar and contacts apps in over CalDAV and CardDAV without opening mail. --member reaches a member’s. Creating one prints its username and its password, shown once.
  • nextmail threads list-automations <id> prints the automations that ran on a thread: what started each run and the case the email matched, the messages it started from or sent, such as an automatic reply, and every step it ran with its outcome.
  • nextmail live-events stream follows the mailbox as it changes and prints each event as one JSON object per line the moment it arrives, on a terminal, in a pipe and with --json alike, until you press Ctrl+C (exit 130). --types takes a comma-separated list of message.received, message.sent, thread.changed, thread.deleted and message.status_changed, --address keeps one address, --last-event-id resumes after an event, and --max <n> stops after that many events. It reconnects and resumes by itself when the connection ends or drops.
  • nextmail threads wait-for-email waits for a message to arrive and prints it, or message: null when the wait ran out: --address, --from, --subject and --since narrow it and --timeout sets how many seconds to wait, from 0 to 60.
  • Generated commands whose SDK method follows a stream (RESOURCE_FOLLOW_METHODS) print it line by line instead of collecting it under --json or batching it into tables on a terminal, and take --max.
  • A forwarding destination whose server refused forwarded mail for good shows bounced in the forwards, group members and routes of an address, and a route that forwards there shows forward_bounced as its inactiveReason. Asking it again sends a new confirmation.
  • Each nextmail traffic list entry carries verdicts.arc, the ARC verdict for the servers that forwarded the message on its way in.
  • nextmail calendar list-calendars, get-calendar, create-calendar, update-calendar and delete-calendar manage your calendars, and set-calendar-member and remove-calendar-member give a member of the workspace read or write access to one you keep. create-event takes --calendar-id, update-event takes it to move an event, list-events takes --calendar-ids, create-feed takes --calendar-id to publish one calendar, and import-ics takes --calendar-id for the calendar the events go into.
  • nextmail contacts list-address-books lists your address book and the ones other members gave you access to, and set-address-book-member and remove-address-book-member manage who reaches yours. list-cards takes --address-book to read one you are a member of, and create-card takes it to add to one you may write.
  • nextmail traffic list reads the traffic log, newest first: --direction, --outcomes, --domain-id, --address, --recipient, --since and --until narrow it, and --all walks every page.
  • nextmail emails send-raw sends a message file as written (--raw message.eml, or - for standard input), with the envelope from --to, --cc and --bcc when given.
  • nextmail automations create and update take senders in an email_received trigger, the addresses or domains its mail has to come from. Left out or empty, mail from anybody starts it.
  • nextmail settings update takes labelAlerts, label ids under each workspace id whose mail still alerts you while labelled mail stays out of your inbox, and nextmail settings get shows it.
  • A connected mailbox or an import on an address whose mail OpenEmail receives shows openemail as its provider, and a message sent with OpenEmail shows it as sentWith.
  • sentWith stays empty, rather than naming Outlook or Gmail, when another mail service signed the message and the only hint is that it passed through Microsoft’s or Google’s servers on the way or was written in the Outlook app.
  • share-links list lists the templates, forms and automations the workspace shares at a public link, with how often each page was opened and each item copied, --kind for one kind and --all for every page. share-links get <kind> <item-id> reads the link of one item, share-links set <kind> <item-id> makes it public, with --no-copyable to let people only look at it, and share-links delete <kind> <item-id> makes it private again.
  • shared get <token> reads what the public page of a link shows, and shared copy <token> copies the item into the workspace as a draft.
  • tasks list takes --chat-id <id> to list only the tasks made in one assistant chat, the ones the chat shows above its messages.

0.0.3

  • emails list-events-by-message-id <message-id> reads the event trail of a sent email found by the Message-ID it went out with, --all every page, and takes --address as list-events does.
  • provider-imports list takes --source, --status and --search, as imports list does.
  • emails list-events <id> takes --message-id, and answers only when the send went out with that Message-ID.
  • files create-link takes --reuse, which hands back the working public link the file already has instead of making another.
  • keys create, update and delete, keys rotate for any key but the one signed in, and the ownership commands (workspaces offer-ownership, withdraw-ownership-offer, account accept-ownership-offer and decline-ownership-offer) exit 4 with code console_only when the profile uses an API key. Make those changes in the console.
  • app-host get, set and verify show sender, where the emails sent to the people of the workspace come from: an address, its domain and waitingOn, which is logo or signing until they come from noreply@ the domain of the live web app address.
  • addresses list shows the role of each address: owner for an API key, and member or viewer through an app a member connected. A key narrowed to particular addresses or domains lists only the ones it covers.
  • chats list-messages <id> reads the messages of a chat, --order desc from the newest and --all every page. chats send-message <id> --content <text> talks to the assistant and prints the turn once it has answered, --regenerate answers the last message again, and chats approve-tool-call and chats deny-tool-call <id> <tool-call-id> answer the calls it waits for. These three wait up to 5 minutes by default, or --timeout-ms. chats stop-turn stops it.
  • members get-directory-sync, connect-directory-sync, disconnect-directory-sync, list-directory-people, set-directory-default-role and set-directory-group-role manage directory sync (SCIM). connect-directory-sync prints the token once.
  • security get-policy reads the two-factor requirement of the workspace and security update-policy --require-two-factor sets it.
  • workspaces get-ownership-offer, offer-ownership and withdraw-ownership-offer hand a workspace to one of its members, and account list-ownership-offers, accept-ownership-offer and decline-ownership-offer answer an offer.
  • account set-name and account end-connected-app-elevation, which makes a connected app ask for codes again.
  • dns-connections start prints the link that connects a Cloudflare account, and domains start-gravatar-publish the link that publishes an address photo to Gravatar. domains create-mail-app-profile-link makes a one-time link that sets an address up on an Apple device.
  • threads set-replying and clear-replying show the team who is replying, threads list-tracking and get-delivery read how the mail sent in a thread was read and whether it arrived, and threads list-file-links <id> <message-id> reads the download links one message carried. threads counts takes --hide-labelled.
  • senders get-avatar <email> --out <file> saves the picture of a sender.
  • emails send takes --is-forward, --original-message and --encryption '<json>' for a message sealed with OpenPGP, and emails translate takes --skip-quoted. emails list-events, get-tracking and the tracking opens and clicks commands take --address, and tracking list takes --offset-minutes.
  • templates update, replace-content and publish take --expected-updated-at, and drafts create and update take --attachments '<json>'.
  • New filters: rules list-runs --rule-ids, contacts list --audience-id, contacts activity --from --to, audiences list-contacts --inactive-days, --since and --until on audiences growth, forms analytics and bookings analytics, --since on broadcasts analytics and stats, imports list --source --status --search and signatures list --from. contacts set-audiences and audiences add-contact take --create-contact.
  • domains create-address and domains update-address take --expires-at and --on-expiry stop or delete, which give an address a time to expire, and domains get-address shows expiresAt, onExpiry and expiredAt. They also take --destination webhook --webhook-id <id>, --destination group, --group-posting, --group-keep-copy and --tap-webhook-ids.
  • domains list-routes, get-route, create-route, update-route and delete-route manage the pattern routes of a domain, such as support-*, which deliver, forward, post to a webhook or rewrite mail to addresses nobody created. list-routes --all walks every page, and domains test-route --address <local-part> says which step decides mail to an address.
  • domains list-group-members, add-group-members --members '<json>' and remove-group-member manage the group members of a group address: addresses of the workspace and addresses at other providers, which confirm by email first.
  • domains update --alias-of <domain-id> makes a domain an alias of another domain of the workspace, and domains get shows aliasOf and aliases.
  • domains update-address-limits --receiving-storage-bytes sets a storage quota for one address, from 1 MiB to 1 TiB, and domains get-address-limits shows it with usage.storage, the bytes and messages the address keeps. Mail past the quota gets a permanent bounce (5.2.2).
  • webhooks list-dead-letters reads the events an endpoint gave up on, the open ones by default or with --status replayed, discarded or all. webhooks replay-dead-letters sends up to 100 of them again and prints what happened to each, and webhooks discard-dead-letter closes one without sending it.
  • webhooks create and webhooks update take --retry-policy standard or extended (up to 16 attempts over about 3 days) and --include-raw, which puts a link to the message source into each email.received event.
  • threads get-raw-message downloads the source of one message as an .eml file: the bytes as they arrived when the address keeps originals, and otherwise a source rebuilt from the stored message, the same one mail apps read over IMAP.
  • domains create-address --keep-original and domains update-address --keep-original keep every message the address receives byte for byte as it arrived, and domains get-address shows keepOriginal.
  • domains get-address-limits and domains update-address-limits read and change the sending and receiving limits of one address: a hold that pauses or disables it, caps on messages and recipients an hour, a day and a month, recipients in one message, who it may send to and whose mail it accepts, with what it has used so far.
  • domains get and domains update show for each DNS record what public DNS answers at its name (found) and the usual reason it does not match (problem).
  • domains update --autodiscovery offers the SRV and TXT records that let mail, calendar and contacts apps find the servers from an address on the domain alone, listed in autodiscoveryRecords.
  • webhooks create --include-content and webhooks update --include-content put the message into every email.received event as data.content, with a link to each attachment that works for an hour. Turning it on needs threads:read.
  • emails send with an API key, broadcasts, automations and forms accept a connected mailbox as the sender, and your free address too. Only its own person may send as a free address.
  • threads counts leaves labelled mail out of team.assigned and team.unassigned, as the inbox does, unless the person has chosen to show labelled mail in the inbox.
  • domains list, members list, keys list, webhooks list, rules list and connected-mailboxes list take --q, which searches every field a person reads on the row.
  • rules stats reads how the rules did inside a window, with --rule-ids, --since, --until, --grain and --offset-minutes.
  • billing get shows usage.addressChecks, the deep address checks used this calendar month against what the plan includes, and billing list-plans each plan’s monthlyAddressChecks.
  • tools check-address and tools check-addresses with --deep first use the deep checks the plan includes each month (10 on Free, 100 on Pro and Starter, 500 on Business, 1,000 on Enterprise), then pay as you go at $1.50 per 100 addresses.
  • automations create and automations update accept the branch condition { "kind": "address_check", "mailbox": false, "accept": "valid_or_risky" }, which checks the contact’s address before the next step.
  • A send leaves out an address whose domain takes no mail, and one the check on sending finds has no mailbox. Each shows as suppressed, never as a bounce.
  • forms create and forms update take --settings-refuse-disposable, which refuses throwaway addresses, and --settings-check-mailbox, which runs a deep check on every sign-up. forms subscribe refuses an address whose domain takes no mail as undeliverable.

0.0.2

  • Keys begin nm_live_ or nm_test_, and a key created before this release no longer works: create a new one with nextmail keys create or in the app, then sign in again.
  • The image upload commands (account set-photo, contacts set-photo, domains set-address-photo, bookings upload-background, branding upload-image and templates upload-image) take files up to 100 MB and a --crop of {"x": ..., "y": ..., "width": ..., "height": ...} fractions to keep only part of the image, and wait up to ten minutes for a large upload.

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.
  • Every workspace is the same kind, the one that holds the free address included. That address sends only the mail a person writes in the app, so a send from it with a sign-in or an API key is refused with from_address_forbidden.
  • 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.