CLI
Changelog
Every release of the CLI, newest first.
0.1.0
nextmail calendar list-todos,get-todo,create-todo,update-todoanddelete-todowork with your to-dos.list-todostakes--calendar-ids,--state(open,doneorall),--due-beforeand--due-after, and--allwalks every page.create-todoandupdate-todotake--title,--dueand--start(a day asYYYY-MM-DDor a moment),--status,--priority,--categories,--parent-id,--recurrenceand the rest, andupdate-todo --status COMPLETEDchecks one off.nextmail calendar list-calendars --kind todoslists your to-do lists, andcreate-calendar --kind todosmakes one.nextmail calendar delete-calendarsends a cancellation to the guests of every upcoming meeting you organised in the calendar, ascancel-eventdoes, and prints how many incancelledMeetings.--no-notify-guestsdeletes it without telling anyone.nextmail calendar list-calendar-logins,create-calendar-login,revoke-calendar-loginandcreate-calendar-login-profile-linkmanage 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.--memberreaches 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 streamfollows 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--jsonalike, until you press Ctrl+C (exit 130).--typestakes a comma-separated list ofmessage.received,message.sent,thread.changed,thread.deletedandmessage.status_changed,--addresskeeps one address,--last-event-idresumes 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-emailwaits for a message to arrive and prints it, ormessage: nullwhen the wait ran out:--address,--from,--subjectand--sincenarrow it and--timeoutsets 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--jsonor batching it into tables on a terminal, and take--max. - A forwarding destination whose server refused forwarded mail for good shows
bouncedin the forwards, group members and routes of an address, and a route that forwards there showsforward_bouncedas itsinactiveReason. Asking it again sends a new confirmation. - Each
nextmail traffic listentry carriesverdicts.arc, the ARC verdict for the servers that forwarded the message on its way in. nextmail calendar list-calendars,get-calendar,create-calendar,update-calendaranddelete-calendarmanage your calendars, andset-calendar-memberandremove-calendar-membergive a member of the workspacereadorwriteaccess to one you keep.create-eventtakes--calendar-id,update-eventtakes it to move an event,list-eventstakes--calendar-ids,create-feedtakes--calendar-idto publish one calendar, andimport-icstakes--calendar-idfor the calendar the events go into.nextmail contacts list-address-bookslists your address book and the ones other members gave you access to, andset-address-book-memberandremove-address-book-membermanage who reaches yours.list-cardstakes--address-bookto read one you are a member of, andcreate-cardtakes it to add to one you may write.nextmail traffic listreads the traffic log, newest first:--direction,--outcomes,--domain-id,--address,--recipient,--sinceand--untilnarrow it, and--allwalks every page.nextmail emails send-rawsends a message file as written (--raw message.eml, or-for standard input), with the envelope from--to,--ccand--bccwhen given.nextmail automations createandupdatetakesendersin anemail_receivedtrigger, the addresses or domains its mail has to come from. Left out or empty, mail from anybody starts it.nextmail settings updatetakeslabelAlerts, label ids under each workspace id whose mail still alerts you while labelled mail stays out of your inbox, andnextmail settings getshows it.- A connected mailbox or an import on an address whose mail OpenEmail receives shows
openemailas its provider, and a message sent with OpenEmail shows it assentWith. sentWithstays 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 listlists the templates, forms and automations the workspace shares at a public link, with how often each page was opened and each item copied,--kindfor one kind and--allfor 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-copyableto let people only look at it, andshare-links delete <kind> <item-id>makes it private again.shared get <token>reads what the public page of a link shows, andshared copy <token>copies the item into the workspace as a draft.tasks listtakes--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,--allevery page, and takes--addressaslist-eventsdoes.provider-imports listtakes--source,--statusand--search, asimports listdoes.emails list-events <id>takes--message-id, and answers only when the send went out with that Message-ID.files create-linktakes--reuse, which hands back the working public link the file already has instead of making another.keys create,updateanddelete,keys rotatefor any key but the one signed in, and the ownership commands (workspaces offer-ownership,withdraw-ownership-offer,account accept-ownership-offeranddecline-ownership-offer) exit 4 with codeconsole_onlywhen the profile uses an API key. Make those changes in the console.app-host get,setandverifyshowsender, where the emails sent to the people of the workspace come from: anaddress, itsdomainandwaitingOn, which islogoorsigninguntil they come fromnoreply@the domain of the live web app address.addresses listshows theroleof each address:ownerfor an API key, andmemberorviewerthrough 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 descfrom the newest and--allevery page.chats send-message <id> --content <text>talks to the assistant and prints the turn once it has answered,--regenerateanswers the last message again, andchats approve-tool-callandchats 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-turnstops it.members get-directory-sync,connect-directory-sync,disconnect-directory-sync,list-directory-people,set-directory-default-roleandset-directory-group-rolemanage directory sync (SCIM).connect-directory-syncprints the token once.security get-policyreads the two-factor requirement of the workspace andsecurity update-policy --require-two-factorsets it.workspaces get-ownership-offer,offer-ownershipandwithdraw-ownership-offerhand a workspace to one of its members, andaccount list-ownership-offers,accept-ownership-offeranddecline-ownership-offeranswer an offer.account set-nameandaccount end-connected-app-elevation, which makes a connected app ask for codes again.dns-connections startprints the link that connects a Cloudflare account, anddomains start-gravatar-publishthe link that publishes an address photo to Gravatar.domains create-mail-app-profile-linkmakes a one-time link that sets an address up on an Apple device.threads set-replyingandclear-replyingshow the team who is replying,threads list-trackingandget-deliveryread how the mail sent in a thread was read and whether it arrived, andthreads list-file-links <id> <message-id>reads the download links one message carried.threads countstakes--hide-labelled.senders get-avatar <email> --out <file>saves the picture of a sender.emails sendtakes--is-forward,--original-messageand--encryption '<json>'for a message sealed with OpenPGP, andemails translatetakes--skip-quoted.emails list-events,get-trackingand thetrackingopens and clicks commands take--address, andtracking listtakes--offset-minutes.templates update,replace-contentandpublishtake--expected-updated-at, anddrafts createandupdatetake--attachments '<json>'.- New filters:
rules list-runs --rule-ids,contacts list --audience-id,contacts activity --from --to,audiences list-contacts --inactive-days,--sinceand--untilonaudiences growth,forms analyticsandbookings analytics,--sinceonbroadcasts analyticsandstats,imports list --source --status --searchandsignatures list --from.contacts set-audiencesandaudiences add-contacttake--create-contact. domains create-addressanddomains update-addresstake--expires-atand--on-expiry stopordelete, which give an address a time to expire, anddomains get-addressshowsexpiresAt,onExpiryandexpiredAt. They also take--destination webhook --webhook-id <id>,--destination group,--group-posting,--group-keep-copyand--tap-webhook-ids.domains list-routes,get-route,create-route,update-routeanddelete-routemanage the pattern routes of a domain, such assupport-*, which deliver, forward, post to a webhook or rewrite mail to addresses nobody created.list-routes --allwalks every page, anddomains test-route --address <local-part>says which step decides mail to an address.domains list-group-members,add-group-members --members '<json>'andremove-group-membermanage 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, anddomains getshowsaliasOfandaliases.domains update-address-limits --receiving-storage-bytessets a storage quota for one address, from 1 MiB to 1 TiB, anddomains get-address-limitsshows it withusage.storage, the bytes and messages the address keeps. Mail past the quota gets a permanent bounce (5.2.2).webhooks list-dead-lettersreads the events an endpoint gave up on, the open ones by default or with--status replayed,discardedorall.webhooks replay-dead-letterssends up to 100 of them again and prints what happened to each, andwebhooks discard-dead-lettercloses one without sending it.webhooks createandwebhooks updatetake--retry-policy standardorextended(up to 16 attempts over about 3 days) and--include-raw, which puts a link to the message source into eachemail.receivedevent.threads get-raw-messagedownloads the source of one message as an.emlfile: 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-originalanddomains update-address --keep-originalkeep every message the address receives byte for byte as it arrived, anddomains get-addressshowskeepOriginal.domains get-address-limitsanddomains update-address-limitsread 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 getanddomains updateshow for each DNS record what public DNS answers at its name (found) and the usual reason it does not match (problem).domains update --autodiscoveryoffers the SRV and TXT records that let mail, calendar and contacts apps find the servers from an address on the domain alone, listed inautodiscoveryRecords.webhooks create --include-contentandwebhooks update --include-contentput the message into everyemail.receivedevent asdata.content, with a link to each attachment that works for an hour. Turning it on needsthreads:read.emails sendwith 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 countsleaves labelled mail out ofteam.assignedandteam.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 listandconnected-mailboxes listtake--q, which searches every field a person reads on the row.rules statsreads how the rules did inside a window, with--rule-ids,--since,--until,--grainand--offset-minutes.billing getshowsusage.addressChecks, the deep address checks used this calendar month against what the plan includes, andbilling list-planseach plan’smonthlyAddressChecks.tools check-addressandtools check-addresseswith--deepfirst 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 createandautomations updateaccept 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 createandforms updatetake--settings-refuse-disposable, which refuses throwaway addresses, and--settings-check-mailbox, which runs a deep check on every sign-up.forms subscriberefuses an address whose domain takes no mail asundeliverable.
0.0.2
- Keys begin
nm_live_ornm_test_, and a key created before this release no longer works: create a new one withnextmail keys createor 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-imageandtemplates upload-image) take files up to 100 MB and a--cropof{"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 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. - 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,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.