Mail
Email CLI changelog
Read Mail CLI release notes, including new capabilities, changes and fixes.
Notable changes to @wirecat/mail-cli. One section per version, newest first.
0.32.0 — 14.11.2026
Changed — may break callers
- A
readonlylevel no longer stopsmail sync(cli-core 0.662.0, was 0.661.0). A command that only fetches mail into the local store runs atreadonly;denystill refuses it. Commands that write the owner's files or call another service stay blocked byreadonly. A profile that usedreadonlyto stop syncing sets the key todeny.
0.31.0 — 14.11.2026
Fixed
rules import --format gmailtakes--yesover MCP. An agent could only preview the rules Gmail's filters suggest: the tool offered only the command's own options, and--yeswas the program's.rules exportanswers over MCP. The call failed with "the command printed its answer instead of handing it over". An agent now gets the rules file as the answer; in a terminal and in a pipe it still prints the file itself, sorules export > rules.jsonimports back.rules applyno longer offers a run that read nothing to run again under the same time limit. Over MCP the step said to pass a longer--timeout, which an agent cannot, and was marked safe to run unasked, so a resumed run could repeat with no progress. Over MCP it now tells the owner to give the server a longerMAIL_TIMEOUTor to run it in a terminal; in a terminal the step adds--timeout 30mand waits for the owner.messages delete --ruleskeeps mail from a sender the owner wrote to. It judged senders from the stored mail, where the owner's own mail from an IMAP Sent folder looked received. So an envelope from someone the owner answered could be offered for Trash, and a preset rule could still catch that sender. cli-core now labels the owner's stored mail Sent, and the cleanup's "replied" and "sent" reasons hold for IMAP mailboxes too.
0.30.0 — 14.11.2026
Changed — may break callers
- Built on cli-core 0.659.0 (was 0.657.0). See the cli-core changelog.
Fixed
- A shared config with a small slip is mended when it is read.
~/.config/WireCat/config.jsonwith a byte-order mark, a comment, a trailing comma or a missing comma between two lines is fixed in place, the old file kept beside it asconfig.json.bak-<time>. Other damage names its line, column and the likely fix.
0.29.0 — 14.11.2026
Added
rules apply --cursorgoes on from where a stopped run ended. A run that reaches its time limit answersstate: partialwith the cursor and the step that goes on. The run that ends the window reports the counts for all of it.rules applytakes--yesover MCP. An agent could only preview it: the tool did not offer--yes.
Fixed
rules applyfinishes on a large mailbox, and over MCP it answers in time. It failed after 27 seconds on a mailbox of 17,000 emails, which takes about 4 minutes to list. It now runs up to 15 minutes by default (45 seconds over MCP, where clients give up after about a minute;--timeoutstill sets it). It reads the headers newest first and saves its work batch by batch, so a run that stops keeps what it did.score:and--kindjudge a sender by its mail in the store, so where a run stops never changes what they decide.rules applysays when it runs out of its time limit. The error said the mail server did not answer in time. Now it says the command reached its time limit and to run it again with a longer--timeout.
0.28.0 — 13.11.2026
Fixed
- Telemost meeting notes in Yandex's older layout get their summary (cli-core 0.657.0). Most notes emails have no «Итоги» heading: the summary is now the text before the first heading, and Yandex's footer is no longer stored.
0.27.0 — 13.11.2026
Changed — may break callers
- Built on cli-core 0.656.0 (was 0.653.0). See the cli-core changelog.
Fixed
- Sync runs on a fresh install. A shared WireCat config (
~/.config/WireCat/config.json) that could not be read (a byte-order mark, broken JSON, a folder in its place, an oldersetupshape) made every WireCat tool read-only and refusedsync. Now only the owner's own "read only" answer limits a tool, and even then a sync runs: it only reads the service into the local store (cli-core 0.656.0).
0.26.0 — 13.11.2026
Added
rules add --do meeting-notes:<provider>saves meeting notes as meetings. Each email the rule matches is kept whole, protected, and on sync also saved as a meeting of that provider, linked to the calendar event in the same room that day. Without a condition it matches the provider's sender:--do meeting-notes:telemostis[email protected].rules apply --yessaves the notes stored before the rule; its dry run counts them.rules list,exportandimportcarry the flag.
Changed — may break callers
- Built on cli-core 0.651.0 (was 0.648.0). A missing OAuth sign-in is now reason
session.missing(wasoauth.missing),ai.address-refusedis nowmodel.address-refused, and a stale meeting project fingerprint exits asconflictinstead ofconfiguration_error. The first screen listspbx, the Asterisk tool. What changed in between is in cli-core's changelog. - Built on cli-core 0.648.0 (was 0.647.0). A profile name that no profile has now exits with code 6.
store resetis no longer offered over MCP. What changed in between is in cli-core's changelog.
Fixed
- Two sign-ins that finish at the same time keep both records.
sign-ins.json, whichdoctorreads, is changed under a lock, so one profile's record no longer overwrites another's.
Security
contracts/wirecat.jsonlists the hosts cli-core reaches for mail: npm forupgrade, and Hugging Face and GitHub for the model downloads and the hosts they redirect to. WireCat Desktop shows them before you install mail.- mail reaches only the hosts it declares. Sign-in, the Google account check, server discovery and the sender
score's registry lookups go through
hostFetch, which refuses any other host before a byte leaves and checks every redirect. A discovery file or a registry that redirects to another host is no longer followed: discovery tries the next source, and the registry lookup counts as failed and is asked again on a later run. The package shipscontracts/wirecat.json, so WireCat Desktop shows these hosts before you install mail.
0.25.0 — 13.11.2026
Changed — may break callers
- Built on cli-core 0.647.0 (was 0.630.0). The store moves to a newer version on first open (additive). Lists
read from cli-core are
ListResults,doctor reports showanddoctor reports createwrite a problem report to send, and acrm.<provider>:<account>.activitiessetting is offered. What changed in between is in cli-core's changelog. - Model calls stay on this computer when you ask. With the local-only switch on (
memo models local-only set on), every model call cli-core makes for mail, remote embeddings included, refuses an address that is not this computer before anything is sent. Plainhttp://is now accepted only to this computer, so records never cross the network unencrypted; use https or run the model locally.
0.24.0 — 10.11.2026
Changed — may break callers
- Built on cli-core 0.630.0 (was 0.618.0). The store moves to version 63 on first open. A mailbox you connect under another person's name is no longer joined to you: it waits for you as a proposal. What changed in between is in cli-core's changelog.
schedule pause <name>andschedule resume <name>take a schedule off its timer and keep it;schedule runstill runs it.--atrepeats:--at 08:30 --at 18:00runs twice a day.
0.23.1 — 08.11.2026
Added
MAIL_READ_ONLYletsrules addthrough, narrowed, so memo's scheduled mail triage can file a sender as envelopes: only--senderor--list-idwith--do envelope, only where no rule with those conditions exists, recorded withsource: agent.--domain,--filter,--kind, any other action or a tag, a replaced rule,rules remove|import|applyand every change on the mail server stay refused.
Fixed
- A
sync --rescanthat stops at its request cap now says so and says how to go on.--timeoutsets the cap (about 85 requests at the default) and--max-pagescan only lower it, so a high--max-pageslooked ignored. Running the same--rescanagain starts over from the newest mail and never reaches the oldest; the hint and the next step now name the cap and tell you to runsyncwithout--rescan, which continues from where the run stopped. - cli-core 0.618.0 (was 0.614.0). After
store recover run(from memo, tg, max or wa) the recovered store makes each mail folder forget the UIDs it listed past its last stored email from a day before the last deep check that passed, so the next ordinarymail syncreads that mail again;--rescanis no longer needed for it.
0.22.0 — 08.11.2026
Added
session start --method oauthsigns a new Gmail profile in with WireCat's Google app. No Google Cloud client of your own is needed;--client-filestill names yours. Google may show an "unverified app" screen until it finishes its review.--method app-passwordasks for the app password, the default for Gmail.--methodsets only a new profile's way; an existing one is switched withconfig set auth.mail <profile> account remove --keep-data|--delete-dataremoves a profile from this computer: it signs out (a Gmail OAuth sign-in is also revoked at Google, which can end other sign-ins of the same Google app, assession end --revokedoes), deletes the app password or sign-in from the keyring, forgets the profile in the settings and its sign-in record, and, with--delete-data, deletes its stored mail and its change logs.--keep-dataleaves the mail searchable. The old Himalaya keyring entry is not touched, and other profiles stay as they are.
Fixed
account removeno longer revokes a Gmail grant that another profile uses. Google ends a grant for the whole Google account and app, so when another profile signs in to the same address (any letter case) with Google OAuth, the revoke is skipped: the answer givesrevoked: falseand says "Google access kept: profile uses the same address".- The Gmail hints point to the app-password page and call the password 16 letters.
session startnow links https://myaccount.google.com/apppasswords instead of the help article (kept under "Sources"), and says "16-letter password", since Gmail app passwords are letters.
0.21.0 — 08.11.2026
Added
messages send --htmlsends an HTML message. The text (argument or stdin) is HTML; the plain-text alternative is made from it, and the mail goes asmultipart/alternative. The answer giveshtml_chars. A reply keeps plain text:--htmlwith--reply-tois refused.
0.20.0 — 08.11.2026
Changed — may break callers
- mail runs on cli-core 0.608.0, and the shared store moves to version 57. A WireCat tool on a cli-core older
than 0.606.0 then refuses the store and asks to be upgraded, so update every WireCat CLI together. A CRM's deal and
lead people are stored as reported, not confirmed by the owner, and
config settakescrm.<provider>:<account>.linksandcrm.<provider>:<account>.company-types.
0.19.0 — 08.11.2026
Added
session start --json --answer-stdinsigns in from WireCat Desktop's window. Each question is aneedsline on stderr and its answer one line on stdin: the address (unless--addressgives it), the IMAP and SMTP servers only when discovery finds none, and the app password as a secret, with a hint naming the provider's own page on making one.progresslines say when the server is looked up and the login checked; Outlook, Microsoft 365 and Gmail over OAuth send anopen_urlline. A refused or failed check carries a reason:mail.login-refused,mail.app-password-requiredandmail.imap-disabled(both from Gmail's own words),mail.host-unreachable. Nothing changes at a terminal.
Fixed
- Updated cli-core to 0.604.0.
0.18.0 — 07.11.2026
Fixed
- Undo docs name the real field. A change answers with
run_id, and themessages restore --writeexample shows a real operation id. - mail runs on cli-core 0.600.0.
statusopens the store read-only even when an older WireCat tool left it at an older schema: cli-core now brings it up to date first, so mail no longer does that by itself. The shared store moves to version 54 (CRM pipelines kept apart per account, CRM field definitions), and an older WireCat tool still reads it.schedule listgives each schedule'snotifysetting. schedule agentandschedule commandsend a run's result with--deliver-to <route>(telegram-bot:<profile>/<chat>oremail:<profile>/<address>, repeated for more), andschedule listshows the routes asdeliver_to.--tokeeps one meaning in mail: the address a message goes to.
0.17.0 — 06.11.2026
Added
- mail runs on cli-core 0.587.0 and cli-base 0.80.0.
messages reset --holder <name> --since-time <time> | --last <n>lets the owner move an agent's mail mark back, so its nextreview --holdergives that mail again (--dry-runcounts first).review --holdergives the findings key and leaves out newsletters rather than all bulk mail.schedule listgives each agent schedule's cost caps. The shared store moves to version 52 (deals) the first time mail opens it, and an older WireCat tool still reads it. messages restore --write <id>undoes one write of a run and leaves the others. The id is anoperation_idthe run's answer listed underwrites. A later restore of the whole run undoes the rest. A run logged before writes had ids, or an id it does not hold, is refused asnot_found(mail.write-unknown).drafts sendlists the draft's removal from Drafts underwrites(op: "delete"), with its ownoperation_idbeside the send's. A Gmail restore from Trash lists putting the labels back as alabelwrite that names the write it undoes, and the change log keeps it. Both writes were made before, but answered no id.- Every write answers with its own
operation_id, and the change log keeps it. Themessageschanges,messages deleteandmessages restorelistwrites: one entry per write to the server, with itsoperation_id, what it did (op), the folder,tofor a move and how many messages. A restore's write also names the write it undoes (undoes).folders create|rename|deleteanddrafts create|update|deletegive theoperation_idof their write. The same ids are in the send journal. account inspectandmessages importsay which time zone they read--since-timein. The answer givesmeta.timezoneand the window in UTC (meta.window.since), assyncdoes.messages importalso givestimezonebesidesince, andaccount inspectadds a line to its table.
Changed — may break callers
- The run a
messageschange made isrun_idin its answer, as in the other WireCat tools.messages mark-read|mark-unread|star|unstar|update|move|copy|deleteanswered it asrun.messages restoreanswersrun_idfor the run it made itself (it wasrestore_run,nullfor a preview) andrestored_run_idfor the run it undid (it wasrun). The--runoption keeps its name: it is the shared vocabulary's flag for "the run it is about". sync,messages importandmessages exportcap a run with--max-messages, andmessages exportwrites into--output-dir.--limitthere capped the work of one run, not the rows of the answer, and it is now the shared vocabulary's work cap for messages.--outputtook a folder, and--outputis the vocabulary's flag for one file. The next step'sargsfollow:max_messagesandoutput_dir. The old flags are gone.--limitstays where it counts what the answer shows:account inspect,stats,drafts list,tags listand themessageschanges'--filterselection.attachments downloadtakes[attachment...]instead of[number...]. The argument names the thing it takes, as the other WireCat arguments do. An agent passes the numbers underattachmentinstead ofnumber, and a refusal namesparam: "attachment". The values are still the numbersattachments listshows.
Fixed
statusanswers on a store an older WireCat tool left at an older schema. It opens the store read-only, so it answers while a sync runs, and a read-only open refuses a schema older than its own. After an upgrade,statusfailed (configuration_error, "needs schema … maintenance") until another command updated the store. It now updates it once itself.- A stop signal lets
messages importfinish the read in flight and keep what it saved, assyncdoes. Before, Ctrl-C or an MCP cancel cut the import at once, while it was still reading. It now stops before the next read and answersstopped: "cancelled". It also gets the deadline of a resumable sync: 15 minutes at a terminal, 45 seconds over MCP, instead of 30 seconds. - The iCloud steps say in plain words how to sign in with the short login. They no longer quote a command line
with its flags, and
session start --helpstill lists--login. - Every screen shows a person their times in the local time zone:
status,sync,messages restore, and, with cli-core 0.587.0,search messages,messages show,conversations list|show,reviewandruns list|show. A table read2025-12-31T14:00:00.000Z, and it now reads2026-01-01 00:00, with no offset, and a linetimes in <zone>names the zone (theTZof the computer, or the zone it is set to). JSON and JSONL answers keep UTC. - Commands that talk to the mail server answer only after they closed the connection and the store.
account check,account inspect,folders,sync,messages export, themessageschanges,draftsand the sends printed their answer first. A failing close now ends in an error instead of after a success. JSON answers are unchanged. - A send whose store fails to close afterwards says so and names its
operation_id.messages send|forwardanddrafts sendthen end inoutcome_unknown: the message was probably sent, and the same command with--operation-id <id>finds it in Sent instead of sending it twice. Before, the error had nooperation_id. - Eleven more refusals carry a registered reason, so
commands infolists them and a script can tell them apart:mail.flag-deleted,mail.no-selection,mail.refs-and-filter,mail.move-to-trash,mail.original-gone,mail.others-for-agent,mail.no-submission,mail.config-unreadable,mail.profile-exists,mail.server-unknownandmail.export-other. Their messages are unchanged. A write whose outcome is unknown now says "check the mailbox before running it again", without namingsync. - The user pages give example values instead of placeholders, and state each fact once. Commands in the usage
guide, the Outlook pages and the overview use example references and ids (
msg:email/me%40example.com/…) where they had<ref>or<id>. The provider list is on the "Prepare the mailbox" page only, and the overview links the search guide instead of repeating it. The usage guide no longer speaks of mail 0.1, and the Microsoft app page no longer describes how the maintainers release a client id. No behaviour changes. - Files
mailreads back are checked field by field instead of trusted. A rules file whose condition has the wrong type is refused with the rule's number. A damaged export journal header, sign-in record, RDAP answer or domain-age cache is treated as missing instead of breaking the command. - The README and
SECURITY.mdsay whatsyncsends out to score new senders: a sender's domain, never an address, to IANA's list of registries and to that domain's own registry. Only the security page said so before. No behaviour changes.
Removed
- The package no longer ships
dist/index.js. It re-exportedrun,createProgram,definitionandIDENTITY, butpackage.jsonnever named it, and no WireCat tool imported it.mailis a command, not a library.
0.16.3 — 05.11.2026
Fixed
- The Microsoft sign-in notes no longer describe publisher verification. They say that making a shared Microsoft app public is complex, and point to your own Microsoft app. No behaviour changes.
0.16.2 — 05.11.2026
Fixed
- The "Prepare the mailbox" page lists the international providers first: Gmail, Outlook, Microsoft 365, iCloud, Fastmail, then Yandex. Mail.ru is no longer on the English page; it stays a built-in provider and keeps its steps in the Russian translation. No behaviour changes.
- The Google and Microsoft sign-in notes no longer describe WireCat's review or verification status. They say that making a shared Google app public for mail is complex, so Google may refuse WireCat's app, and then point to your own Google app or an app password. No behaviour changes.
session endhelp says what--revokedoes to your account. With Gmail over OAuth it asks Google to revoke the sign-in, which signs out every tool that uses the same Google project. The command's description and examples now say so. No behaviour changes.
0.16.1 — 05.11.2026
Fixed
- The tests of the private file modes skip the mode check on Windows, where files have no Unix modes.
- Docs, help examples and the skill name the example profile
personal, notya, as tg does. A second mailbox in an example iswork. No behaviour changes. docs/configuration.mdsays which flag answersask:--allow-dangerousfordrafts delete,--yesfor every other change, andconfirmation_requiredwithout a terminal or a flag.- The sender domain cache and the sign-in records folder are private to you.
domain-ages.jsonis written with mode 600 and the folder that holdssign-ins.jsonwith mode 700, as every other private file of mail's. - Every error and issue reason mail raises is in its registry, so
mail commands infolists it and an agent can branch on it:mail.smtp-login-refused,mail.no-drafts,mail.draft-unknown,mail.gmail-objectid,mail.export-destination-exists,download.exists,mail.unreadable,mail.deletions-skipped,mail.rules-unreadableandmail.export-unreadable. A test keeps the list complete. - The secret scan knows Google's OAuth access tokens, refresh tokens and client secrets.
mail commands infosays whatrules remove,rules applyandrules importanswer with, as every other command does:mail_rule_change,mail_rules_applyandmail_rule_import. The answers are unchanged.rules applycloses its connection to the mail server before it answers, and the tag commands hand the store to the run, so a timeout or a signal closes it too.
0.16.0 — 05.11.2026
Changed — may break callers
- mail runs on cli-core 0.569.0: an agent schedule runs on Sonnet, starts lean and stops for the day at a cost
cap.
mail <profile> schedule agenttakes--model <model>and--max-cost-per-day <usd>. Without them a claude schedule runs onsonnetand a codex one on codex's own default, a new claude schedule starts without your MCP servers, skills, settings and CLAUDE.md, and no run starts for the rest of the day once the day's runs cost 5 US dollars.schedule_model_claude,schedule_model_codex,schedule_lean_startandschedule_max_cost_per_dayin the config file'sdefaultschange that for every new schedule;mail config showlists them.
0.15.0 — 05.11.2026
Changed — may break callers
- The profile sets whether and up to what size
syncreads attachments, and one run can override it. The profile'sread_attachments(defaulttrue) andmax_attachment_mb(default 10) set it;--no-attachments,--attachmentsand--max-attachment-mb <n>override it for one run. A file left unread is stored with its name and size, its extractionnot-readortoo-large. No file is kept either way. messages showreads an email again when one of its attachments was left unread, every attachment whatever its size, so the command now reaches the mail server for such an email.--offlineor a failed read shows the stored email withmeta.complete: falseand the issuemail.attachments-unread.attachments downloadkeeps a file.- Gmail over OAuth signs in with WireCat's Google app when you name none. It needed
--client-fileorMAIL_GOOGLE_CLIENT_IDand failed withmail.oauth-no-clientwithout them. The order is--client-file, thenMAIL_GOOGLE_CLIENT_ID(withMAIL_GOOGLE_CLIENT_SECRET), then the profile's newgoogle_client_id, then WireCat's app. Google has not reviewed WireCat's app for mail yet: if Google refuses it, use your own (steps). Choosing OAuth for a Gmail profile is unchanged. MAIL_MICROSOFT_CLIENT_IDpicks the Microsoft app for one run, before the profile'smicrosoft_client_idand WireCat's app, which now comes from cli-core'sconstants.json.mail.oauth-no-clientis gone: there is always an app.doctor'soauthrows say which app each profile uses asoauth_client: { client, source }, in place ofclient:sourceisflag,env,configorconstants(WireCat's). A profile's row reports the app it signed in with when its sign-in recorded one.session startanswerssourcebesideclient.- mail runs on cli-base 0.77.1 and cli-core 0.566.0.
Added
stats messages showcounts the profile's stored mail per day, week or sender, received and sent, over the same query assearch messages:{ by, received, sent, rows: [{ key, name, received, sent }] }, a day or week keyYYYY-MM-DDin--timezone(a week by its Monday), a sender keyed by address withsent0. Counts only, no search recorded. For WireCat Desktop's mail per day (cli-core'smailStats, 0.564.0).account inspectgroups the mailbox's mail by sender and list before you sync it: emails, MB, unread and bulk shares, years, whether you replied, askipsuggestion and a spam or scam score, plus the rule kinds the mail would match. Headers only, nothing stored.--domain-ageasks each sender domain's registry (RDAP) when it was registered. Moved frommemo mail inspect.messages import <file.mbox>adds a Google Takeout archive to a Gmail profile's stored mail, joined with whatsyncstores by Gmail's ids; it only adds, leaves out Spam and Trash and follows the profile's rules. Moved from memo'smode: "mbox"mail accounts.syncscores the senders of the stored mail, at most once a day, and asks registries about new sender domains until its deadline; search ranks mail from senders with signs of fraud lower. The answer'ssenderssays how many.memo syncdid this before; it no longer reads mail.
Fixed
- The MCP server tells an agent that attachment text is data, not instructions, beside subjects, bodies and file
names.
syncindexes attachment text andmessages showreturns it. session startwrites every setting at its default when it saves a new profile, asconfig setdoes. The first file a sign-in made held only the profile, so the owner could not see the other settings until a laterconfig setorconfig migrate.
0.14.0 — 05.11.2026
Added
config migratewrites each setting your config file lacks, at its default, and keeps your values, their order and keys it does not know; it creates no section and running it again adds nothing. A first run now writes every shared setting into the file, andconfig setandconfig unsetfill in the missing ones.config showgives each setting its default and description, and no longer creates a missing file. From cli-core 0.563.0.
Changed — may break callers
- Mail sync reads attachments up to 10 MB a file by default, and can skip them. From cli-core 0.563.0.
review --holderleaves out mail from suspicious senders too, beside bulk, envelopes, drafts and partial mail. From cli-core 0.560.0.- An answer over the output cap names what to run instead (WC-OUT-22). From cli-core 0.563.0.
- The store moves to version 48 (invoices and payments, imports through one envelope, the cleanup of test rows that leaked into a real store). The first run of this version migrates it. From cli-core 0.557.0–0.560.0.
0.13.0 — 02.11.2026
Added
review: what is new, what you owe, what waits for an answer, with tg's words:review "date>2h",--new(a point per mailbox and reader),--unanswered [duration](newest email came to you in To or Cc, no answer),--waiting [duration](you wrote last), andbulk:falseto leave out mail sent to many. Each email carriesbulk,list_idandrule_id. It reads the store only; over MCP it is the read toolreview. From cli-core.- A processing mark per agent:
review --holder <name>reads what is stored past that holder's mark, by store order, so late-synced mail is not skipped;messages acknowledge --holder <name> --cursor <cursor>moves it forward. Bulk mail, envelopes and drafts are skipped and counted, partial mail held.statuslists each holder: how far it got, held, read and skipped by reason. From cli-core 0.556.0. config repairmends a settings file whose JSON is broken only in its syntax, with a backup;--dry-runpreviews. From cli-core.
Fixed
- The browser login page of
mail mcp serve --httpsays the app asks to reach your mail and namesmail mcp serve --http. It said "your messages" andmail mcp --http. From cli-core 0.551.0.
0.12.0 — 02.11.2026
Added
- Work or school accounts: what to do when Microsoft asks for admin approval (docs/outlook.md):
why
AADSTS90094appears, the admin-consent link for WireCat's app with how to revoke it, and how an organisation registers its own app.
0.11.0 — 02.11.2026
Added
- A guide to connect Outlook.com or Microsoft 365 (docs/outlook.md): turn IMAP on, sign in through the browser, sync and send, and what to do when the token is refused or an admin must allow the app.
0.10.0 — 02.11.2026
Changed — may break callers
search messagessayssearch.server-partial, notsearch.server-too-large. It downloads the first 256 KiB of each message the server finds and stores a bigger one with its text and without its attachments; the nextsyncreads it whole. Before, a candidate over 5 MB was left on the server and a smaller one was downloaded with all its attachments. A script that matchedsearch.server-too-largematchessearch.server-partialinstead.- After
messages send,storedis true only when this message is in the store, not when any other mail of the last 10 minutes was. A caller that readstored: trueas "some mail was synced" reads it now as "this message is stored". mail.search-refusedis cli-core's reason now (cli-core 0.550.0); the reason, its code and its message are the same.
Added
--compactanswers one line per item (cli-base 0.74.0). mail now needs@wirecat/cli-core0.550.0 and@wirecat/cli-base0.74.0.syncsays what became of the emails a search stored text-first:partial_emailswithcompleted(read whole this run),left(waiting for a later run) andstuck(given up on: the server no longer gives them where they were stored). It is absent when there are none.
Fixed
- A Microsoft sign-in whose new token the mail server refuses says how to turn IMAP on. On Outlook.com IMAP is
off by default; the error now names the switch (Settings, "Mail", "Forwarding and IMAP", "Let devices and apps use
IMAP") and no longer claims a refresh was tried. The answer carries the server's response code as
cause_code, never its text. - A server that refuses SEARCH no longer looks like an empty folder.
syncleaves that folder unread and reads the rest: the answer is partial, names it inrefused_folderswith amail.search-refusedissue, and nothing of it is marked deleted.messages move,copy,delete,restoreanddraftsstop withmail.search-refusedinstead of acting on nothing (cli-core). - On Gmail, an email a search stored text-first is read whole by the next
sync. It was never completed there: mail worked out its id from the Message-ID, and Gmail's mail is stored under its X-GM-MSGID, so every sync downloaded the whole message again and threw it away.fetchRawnow reads Gmail's ids beside the bytes. - An email a search stored text-first is no longer downloaded whole on every sync when the server no longer gives it. It is read under the UIDVALIDITY it was stored with, and given up on after three failed tries, or at once when its place holds another message; it no longer holds back newer ones (cli-core).
- A search no longer stores a text-first copy over an email a sync in another process stored whole meanwhile, which dropped its attachments (cli-core).
- The reader of your own Google
--client-fileand the browser opener come from@wirecat/cli-core0.546.0, not copies in mail. The file shapes, thechmod 600check and the errors are unchanged.
0.9.0 — 02.11.2026
Added
- Microsoft sign-in works without a config: WireCat's Microsoft app is built in. The sign-in sends
http://localhost:<port>/callback, the address registered for it (docs/oauth-microsoft.md). Google keeps127.0.0.1.
0.8.0 — 02.11.2026
Added
- Every answer's
metasaysnowandnow_local, the moment it was made (cli-core 0.541.0, cli-base 0.72.0).
Fixed
search messageswaits 20 seconds for a Yandex server by default, not 5: one IMAP SEARCH of a large Yandex INBOX takes 5 to 7 seconds, so the old default always ran out.--server-timestill sets it; the provider registry holds the value.- A scheduled sync no longer fails at 30 seconds while it goes on running.
schedule execwaited for the sync with the 30 s deadline of a one-shot command, answeredtimeout(exit 9) and left the sync writing for up to 15 minutes. It now waits as long as the sync's own deadline allows, and a stop of the run stops the sync too (cli-core). - A Gmail sync uses about 200 MB, not 1 to 1.7 GB. Each round asked the store about every stored email of the account; on a 260,000-email mailbox a 30-day sync now takes seconds instead of minutes (cli-core).
search messages --backendstays inside its time bound: reading the finds and their attachments counts toward--server-time, the bound ends before the command's deadline, nothing is written after the command is stopped, and a find over 5 MB is left on the server (search.server-too-large) (cli-core).
0.7.0 — 01.11.2026
Changed — may break callers
drafts deletetakes--allow-dangerous, not--yes, because a draft deleted this way does not come back (WC-PERM-9). Only the owner passes it; an agent over MCP gets a preview.
Added
messages export --outputrefuses credential folders and the WireCat apps' folders, asattachments downloaddoes.- Outlook.com and Microsoft 365 sign in with OAuth.
mail <profile> session start --address <you>@outlook.comshows what it will ask for, opens Microsoft's page in the browser, logs in to IMAP with the new token, and only then saves the profile and the tokens (keyring entryoauth:microsoft:<profile>). Sync andmessages senduse the token over IMAP and SMTP (XOAUTH2), refreshing it as needed; a token the server refuses is refreshed once, then the errormail.oauth-refusedasks for a new sign-in.session statusshows the app, scopes and expiry, never a token;session endforgets the sign-in and names where Microsoft lists the app.--no-browserprints the link only. microsoft_client_id: the Microsoft app to sign in with, set by you once (config set --defaults); an agent over MCP cannot change it. WireCat's own app is not registered yet, so for now this is required; register a Microsoft app gives the steps.- Gmail over OAuth with your own Google app:
session start --client-file <Desktop client JSON>(or, on a profile switched withconfig set auth oauth,MAIL_GOOGLE_CLIENT_IDandMAIL_GOOGLE_CLIENT_SECRET), for an account that cannot make an app password. The signed-in address must match the profile's. Gmail profiles keep app passwords unless switched. Gmail with your own Google app gives the steps: a Google project just for mail, published without verification.session end --revokeasks Google to revoke it, which ends every sign-in of that project. mail doctorlists each OAuth profile with its app and last sign-in, from disk only, and warns from day 6 that a Google app left in Testing ends its sign-ins on day 7.session statusandsession listanswerauthtoo.
Fixed
- An agent over MCP can attach several files:
--fileofmessages sendandmessages forwardis a list there. - Sending a message no longer shortens the archive's coverage to the last 10 minutes, which memo reported until the next full sync.
attachments listanddownloadshow every attachment, not the first 50, anddrafts updatekeeps them all.- Attachments are saved through cli-core's atomic write, which also syncs the file and the folder to disk.
- The
memo mail deletecommand is named as it is now, in the docs and the help ofmessages delete --rules. - Microsoft 365 is its own provider, found by its MX record, and sends through
smtp.office365.com:587(Microsoft); Outlook.com keepssmtp-mail.outlook.com.
0.6.0 — 01.11.2026
Added
mail <profile> messages export [query] --output <folder>writes the original messages of the stored mail that match a query to mbox files (one per folder, mboxrd) or a Maildir++ tree (--format maildir), for backup or for mu and notmuch. The store keeps text only, so each message is read from the server again. The folder is private (mode 700, files 600); a folder with something in it is refused unless--resumegoes on with an export or--replacewrites over files of the same name.--limitand--max-pagesbound a run, which also stops before its deadline;--resumeskips what the folder holds and cuts back a half-written message.mail <profile> stats messages top --by sender|list|domainranks the stored mail by sender, mailing list or sender domain, with unread counts and size.mail <profile> messages mark-read|mark-unread|star|unstar <ref…>andmessages update <ref…> --flag <flag> --unflag <flag> [--replace]change flags and keywords on the server (read, flagged, answered, draft,$Junk, words of your own); a folder that keeps no keywords answersprovider_unavailable.messages move|copy <ref…> --folder <folder|role>files mail by folder; on Gmail a move is a label added andInboxtaken away, a copy a label added,--folder archiveonlyInboxtaken away.messages delete <ref…>moves mail to Trash, never expunges it;--rulesis memo's envelope cleanup, moved here: envelope mail the rules let go, each decided again, with Gmail's labels and stars read again just before the move, a fresh store backup required and a first run of at most 100; it refuses to run from a schedule.messages restore --run <id>undoes a change run, last step first: Trash back to where the mail was (on Gmail with its labels), moves back, copies removed, flags as they were. memo'smail deleterun ids restore here too. Outside Gmail a copy is removed for good by the UID the server gave it, never by a Message-ID search that could find the original.folders create|rename|delete;deleteis a preview until--yes, and refuses a folder that holds mail, or whose count the server does not give, unless--allow-dangerous, which only the owner passes at a terminal.rules list|add|remove|apply|export|import, moved from memo with the same options: the profile is the mailbox, so there is no account argument; the default import format ismail, the file memo's export writes.- Every message write takes the messages by
refor by--filter '<query>'(--limit, newest first). A deletion, a--filterchange and a change of more than 20 messages answer with a preview and the command with--yesinnext;--dry-runonly previews. The store follows each server change at once: flags, folder and UID, Gmail labels, deletion. - Permissions:
messages.delete,folders.deleteandmessages.bulk(any change of many) ask; the rest of the changes go ahead.MAIL_READ_ONLY=1refuses them all. Each attempt goes into the send journal (cli-core 0.522.0). - Error reasons (
mail.no-trash,mail.run-unknown,mail.archive-unverified, …) now reach the JSON error. mail <profile> drafts list|create|update|deletekeeps drafts in the mailbox's own Drafts folder, so an agent writes one and the owner checks and sends it from any mail app.createtakes--to,--cc,--bcc,--subjectand the text (-reads stdin);--reply-to <ref> [--reply-all]answers a stored message in its thread. A draft is named by its Message-ID;updatereplaces only what is given and keeps the rest, the thread and the attachments, and moves the old version to Trash;deleteremoves it for good and asks first (drafts.delete).mail <profile> tags add|remove <tag…> --message <ref> | --chat <ref>andtags listput your own tags on stored mail and conversations. They stay in the local store, in the same tables memo tags with, and never reach the server;search messages tag:<tag>finds them. Provider keywords staymessages update --flag, Gmail labelsmessages move|copy --folder.mail doctorsays when a change run stopped part way, and when mail a run moved to Gmail's Trash is within five days of Gmail emptying it, with themessages restorecommand for each. memo's doctor said this until the cleanup moved here; memo's own cleanup runs count too. It needs cli-core 0.524.0 (appDoctorCommand'slocalcheck).search messagesasks the mail server too for mail sync has not read yet:--backend archive|server|both(defaultboth) and--server-time(default 5s), astg search messageshas them. Gmail is searched once in All Mail with its own syntax (X-GM-RAW); other servers with IMAPUID SEARCHin INBOX, Sent and Archive, or the profile'sfolders. The server gets the words,from:,to:,cc:,subject:,body:,is:anddate:; what it finds is stored, and the same query then runs on the store, so the answer means the same on both backends and each hit saysfound_in. The mailbox is opened read only.permissions.messages.server-search=denyturns it off;--offlineandMAIL_READ_ONLYkeep to the store (cli-core 0.525.0).mail <profile> messages send --to … --subject … [text]sends over the provider's SMTP server with the same app password; the text comes from stdin when left out.--cc,--bcc,--file <path>(repeat; a named path, never a pattern; credential and WireCat folders refused without--allow-any-file, which an agent over MCP never gets).--reply-to <ref> [--reply-all]answers a stored email:In-Reply-To,References,Re:, the original quoted,\Answeredset on it.messages forward <ref> --to … [text]sends the original attached whole (message/rfc822),Fwd:before its subject, and sets$Forwardedon it.- Sent and the store after a send. Gmail files SMTP mail in Sent itself; elsewhere the copy (with its Bcc line) is
appended to Sent unless Sent already holds that Message-ID. The message is then read into the store as
syncreads it, so it has the server's id and never a second row. - Safety for sends. Mail to anyone but the owner asks first: new key
messages.send.others, defaultask, which the owner may set toallow. The question shows from, to, cc, bcc, subject, each attachment and the first lines.MAIL_READ_ONLY=1,readonlyanddenyrefuse; every attempt goes into the send journal without addresses, subject or text; each recipient counts towardsends_per_hour; sends are spaced with the shared request pace (cli-core 0.523.0). An answer lost after the message left isoutcome_unknown;--operation-idretries it and sends nothing when Sent already has it.--dry-runbuilds the message and sends nothing. A text that says "attached" with no file warns. drafts send <id>sends a saved draft through the same path asmessages send(its keys and question, the hourly limit, the journal, the Sent copy), then removes it from Drafts.attachments list <ref>andattachments download <ref> [number…] --output-dir <dir> [--replace]: the files of one email, read from the server and numbered as the store numbers them, saved readable only by you under their plain names; an existing file is kept unless--replace.- Profile keys
smtp_host,smtp_port,smtp_securityname the submission server for a provider the built-in list does not know. The built-in servers were checked against each provider's help page; Yandex's is nowsmtp.yandex.ru:465.
Changed — may break callers
- An agent over MCP mails only the owner.
messages send,messages forwardanddrafts sendto anyone else answerpermission_errorover MCP until the owner setspermissions.messages.send.othersin the config (askorallow); anmcp serve --permissioncannot open it. At a terminal it still asks. mailis no longer read-only: an MCP client with--allow-writescan change the mailbox through thewritetool, within the profile's permissions.- On a server with OBJECTID (Fastmail, Cyrus) an email's id is the hash of its Message-ID, as memo makes it, not
the server's EMAILID, and its thread comes from References. Ids come from cli-core's
mailIds, which memo uses too, so the two never store one email twice. Gmail keeps its own ids; Yandex and Mail.ru ids do not change. - An agent cannot change where the app password goes, nor who it may mail. Over MCP,
config setandconfig unsetrefuseaddress,login,imap_host,imap_port,imap_security,smtp_host,smtp_port,smtp_security,authandpermissions.messages.send.otherseven withmcp.authority; the owner changes them in a terminal (cli-core 0.530.0).
Fixed
- Built on cli-core 0.530.0 and cli-base 0.71.0. The command lint now knows
drafts,--cc,--bccand--reply-all, and accepts--to <address>and--subject <text>beside the messengers'<chat>and<ref>, so thirteen lint overrides are gone and the budget is 11. The audit compares mail in cli-base'smail-sharedgroup and runs without--complete. cli-core also stops hiding a locked store when it scores senders. - Gmail labels are decoded once. imapflow already decodes them, and mail decoded
R&D-teamagain intoRteam. syncsays when it leaves stored rules out:rules_unreadandrules_unread_why(such ascondition label) in the answer and amail.rules-unreadableissue, when the rules hold a condition this mail does not know.sync --rescanfails on a locked or broken store instead of reporting the rethreading done.- An attachment's file name is cleaned as cli-core's downloads clean it: direction and zero-width characters
that disguise an extension go, and on Windows a reserved name (CON, NUL, …) falls back to
attachment-<n>.
0.5.0 — 01.11.2026
Fixed
- A scheduled sync runs from its timer. The timer starts
mail schedule exec <file>with no profile, and mail refused it with "name a profile" before reading the schedule, so no timed run worked in 0.3.0 and 0.4.0.schedule execnow needs no profile; the schedule's own environment names it (cli-core 0.521.0).
0.4.0 — 01.11.2026
Added
mail <profile> search messages '<query>'searches the profile's stored mail offline, with the query language of every WireCat CLI and memo's ranking: any form of a word,from:,to:,subject:,label:,is:unread,has:attachment,content:,date>7d, andlist:for a mailing list by its List-Id or domain. Mail from a suspicious sender comes after the rest (--plain-orderkeeps the words' order);--newest,--exact,--page.mail <profile> messages show <ref>gives one email whole, with the first 4,000 characters of each attachment's text (--full: all of it and the HTML body), and--before-n/--after-nemails of its thread, in the JSONmemo messages showgives.mail <profile> conversations list [query]andconversations show <thread>: the threads, newest first, filtered bysubject:,emails_count>1orlast_email_at>7d, and one thread's emails oldest first.- Each reads the profile's own mailbox only; a reference of another mailbox is refused. Over MCP they are
readcommands.
0.3.0 — 01.11.2026
Added
mail <profile> scheduleruns a mail command on a timer through systemd, launchd or Task Scheduler, astgdoes:mail ya schedule command mail-ya --every 5m -- sync.doctorsays when a scheduled run keeps failing.
0.2.0 — 01.11.2026
Added
- The skill on ClawHub names its program and npm package, so an OpenClaw user is told to install
@wirecat/mail-clibefore the skill works, as with the other WireCat skills. - mail's MCP server is listed in the official MCP Registry as
dev.wirecat/mail-cli. session startprints the server it found before it sends the password: host, port, security and login, so a wrong guess of discovery is seen before the password goes to it.- A new profile saves how it signs in (
auth). A profile saved before keeps working with itsimap_*settings and signs in with an app password, with nothing to migrate.
Changed — may break callers
syncreads All Mail on Gmail when the profile names no folders. Archived Gmail mail leaves INBOX, so a sync of INBOX alone took it for deleted. All Mail is found by its role, so a Gmail account in another language works too.- Headers are read as memo reads them. A mailing list's
List-Idis stored without its angle brackets and in lower case, and Reply-To, Gmail's SPF, DKIM and DMARC verdicts and the attachment hint are read at list time, so the owner's rules see the same fields in both tools.
Fixed
syncapplies the account's stored mail rules, as memo does. A skip or envelope rule decided in memo now holds formail synctoo, and both tools keep the same saved position, which holds a fingerprint of the rules. A Gmail profile syncs in Gmail mode, as memo does.- Gmail labels are named as memo names them (
Inbox,Sent,Starred, decoded names), so storedlabel:Inboxmailboxes keep matching and nothing is stored aslabel:\Inbox. sync --rescanmoves replies stored by 0.1 into their thread on a server without thread ids, such as Yandex. The answer says how many inrethreaded. Gmail's threads are not touched.- A reply is stored in its conversation on servers without thread ids, such as Yandex and Mail.ru. The thread is
the first email named in References, else in In-Reply-To. Mail stored before moves with
sync --rescan(above). Gmail keeps its own ids. - Every command that asks the server is bound by the run's deadline and Ctrl-C.
session startandsession status --checkopened the mailbox on their own, without the deadline or the abort the other commands had, and a source could reconnect after it was closed. syncasks for at most 20 MB of message bodies in one request, as well as at most 15 messages, so a batch of large attachments does not hold a connection for minutes or fill memory.- The schemas of
account checkandsession statusnamefileas a password source. A password kept in the private file was answered asfilewhile the published schema allowed onlyenvironment,keyringandhimalaya, so a client that checks answers against the schema refused it. - A
syncthat--limitstopped says so. It answersstopped: "limit"and how many new emails it left inremaining, and its next step says the run saved the emails--limitallows, instead of saying it stopped to answer in time.
0.1.1 — 01.11.2026
Fixed
- The docs take you from
syncto a first found email, and say how the password is really kept. Installation, usage and the docs index end withmemo search mail, sincemailfills the shared store and memo searches it. The password is kept in the keyring, falls back to a private file when the keyring fails, and can come fromMAIL_PASSWORD; it is never read from stdin.rate_limitednames both causes: the server limiting the account, andsyncrunning out of its own request budget. The docs also say thatmemo mail deletemoves Gmail mail to Trash.
0.1.0 — 31.10.2026
Added
mailreads a mailbox over IMAP into the shared WireCat store, and never changes the mailbox.memoand the other WireCat tools then search and read that mail on your computer.maildoes not send mail.session startsigns a profile in with an app password. A new profile takes--address, or asks for it at a terminal. It finds the server through a built-in table (Yandex, Gmail, iCloud, Mail.ru, Fastmail), the MX record, Thunderbird's ISPDB and the domain's autoconfig file;--provider, or--hostwith--portand--security, sets it by hand and skips those lookups. It shows the steps to prepare the mailbox, asks for the app password with no echo (or readsMAIL_PASSWORD), checks it on the server, and only then saves the profile and keeps the password in the OS keyring. Without a terminal it never asks and names the missing option or variable. An app password that Himalaya already keeps in the keyring is used whenmailhas none. The steps for every provider are on Prepare the mailbox. Outlook and Microsoft 365 accept only OAuth, sosession startrefuses them for now.session status,session endandsession listmanage the sign-in.session status --checklogs in to prove the password still works;session endforgets the password and keeps the synced mail;session listtakes no profile and lists the profiles on this computer.account checkandfolders listlog in and show what the server supports, and the folders with their role and message counts.syncreads new mail into the shared store and skips what is already there. It reads INBOX and Sent unless--folderor the profile names other folders, newest first, from--since-time(default: the last 30 days). A date alone starts at local midnight, and the answer gives the time zone and the window in UTC.--limitcaps the new messages of one run and--rescanlists the whole window again. It saves text and headers, not attachments.- A big mailbox syncs over several runs.
syncspends a request budget sized to its deadline (15 minutes at a terminal, 45 seconds over MCP;--timeoutand--max-pageschange it), saves after each part and answersstate: partialwith the command to go on.mail <profile> statusshows how far it is, also while a sync runs. When messages were left unread or deletions were not checked, the answer says so inmeta.issues. syncsurvives a flaky server. A dropped connection is reopened after a short wait and the run goes on; a message the server cannot answer now is asked for again at the end of the run and left for the next one. On a server with no message ids, such as Yandex, each new message is downloaded once and stored mail is not read again.- AI agents use
mailthrough MCP and a skill.mail <profile> mcp serveoffers the profile's commands to an agent over stdio, or over HTTP behind your own tunnel with--http; the profile's permissions decide what runs, and--permissiononly tightens them.mail skill installinstalls the tool's instructions for Claude Code, Codex, Gemini CLI and OpenClaw, and for Hermes with--for hermes. - The app password falls back to a private file when the keyring fails, and is never asked about.
session startkeeps the password incredentials.json(mode 600) in the config folder, says so once on stderr, and answerscredential_storage.--credential-storage filechooses the file outright, not recommended.session statuscan answerpassword_from: "file". - A run with moved folders never removes the owner's app password from the OS keyring. Such a run reads the owner's
password but never replaces or removes it, and stores a new one in a temporary entry.
session endon the owner's password removes nothing and answerskept: "owners-sign-in". wcat mailruns the tool, andwcat --helplists it. The package installswcat-mailbesidemail, andwcat-mail --wcat-describeprints the tool's name, version and description forwcat.doctor --onlinesays whether a newer version is published. It makes no call to the mail server.- The commands every WireCat tool shares:
doctor,commands,config,skill,runsandupgrade.