Terndesk tern-mail
Keyboard-first email with a CLI: search and read your local mail; drafts only when you allow.
Documentation
Every email, from your terminal and your AI agent
Terndesk keeps your mail on your computer, so every message is a command away. Read, search and answer from the terminal with tern-cli, or let Claude Code, Cursor and other AI agents work through your inbox for you, only as far as you allow.
tern-cli: your inbox in the terminal
Search with the same words as the app, read a whole conversation as plain text, or put your unread count in a status bar. It works on every account you allow, Gmail, Outlook and IMAP alike, and reading works offline.
# unread mail, newest first$ tern-cli inbox --unread# the app's own search$ tern-cli search from:priya newer_than:7d# a conversation as plain text$ tern-cli read <thread_id> --last 3# one number, for a status bar$ tern-cli count is:unread in:inbox
Once you allow it, the same commands organise and answer mail: mark done, label, save a draft or send a reply. Add --dry-run to see what a change would do first, and tern-cli undo takes it back.
# mark done, or add a label$ tern-cli done <thread_id>$ tern-cli label Projects <thread_id># save a reply in Drafts, or send it$ tern-cli draft --reply <thread_id> --body "Thursday works for me."$ tern-cli send --reply <thread_id> --body "Thanks, received."# take back the last change$ tern-cli undo
Turn it on in Settings → Command line → Install tern-cli. tern-cli help lists every command.
AI assistants over MCP
Claude Desktop, Claude Code, Cursor and other assistants that support MCP can search and read your mail through Terndesk's MCP server, and answer questions like “anything unread from my team this week?”. If you allow it, they can also mark mail done, label it and save drafts for you to review. They can never send, trash or delete mail.
Claude Desktop: install in one click. With Terndesk installed, download the tern-mail extension and open it with Claude Desktop. It starts the Terndesk app already on your computer and contains no part of it. It's also listed in the official MCP Registry as com.terndesk/tern-mail.
For Claude Code:
$ claude mcp add tern-mail -- tern-mcp
Settings → Command line shows this line, and the setup other assistants need, ready to copy.
The agent skill
The tern-mail skill teaches coding agents such as Claude Code and Codex to use tern-cli well: find a conversation, read it, and ask you before acting on many messages or sending. Add it with one line, or tick “teach Claude Code” when you install tern-cli in Settings.
$ npx skills add terndesk/skills
The skill is public on GitHub.
You stay in charge
Reading first
Until you allow more, tern-cli and AI agents can only read and search. Reading happens on your computer and never goes online.
You allow each kind of change
In Settings → Command line you choose what may change: organising (done, labels, read and unread), drafts, sending, and trash or spam. Every change shows in the Terndesk window with Undo.
Sends and trash ask you
Before tern-cli sends, trashes or marks spam, the Terndesk window shows you exactly what it will do and waits for your Allow, unless you turn that question off for scripts you run on their own. AI assistants connected over MCP can never send or delete mail.
Mail is data, not instructions
Email is written by other people. What tern-cli and the MCP server hand to an agent says so, so the agent treats a message's text as something to read, never as orders to follow.
What you can use it for
- An unread count in a status bar such as Waybar.
- Asking an agent to summarise what came in overnight, or find the invoice from last month.
- Clearing newsletters or labelling a project's mail from a script, with Undo if it goes wrong.
- Having an agent draft replies that wait in Drafts for you to check and send.
Questions
Do I need to install anything besides Terndesk?
No. tern-cli and the MCP server come with the Terndesk app. Turn them on in Settings → Command line, which also shows the line to give your AI assistant.
Which AI agents work with it?
Agents that run shell commands, such as Claude Code and Codex, use tern-cli, and the agent skill teaches them how. Claude Desktop, Claude Code, Cursor and other assistants that support MCP can connect to the MCP server.
Can an AI agent send email without me?
Not unless you let it. Sending is off until you allow it, and then each send from tern-cli waits for your Allow in the Terndesk window, unless you turn that question off. Over MCP an assistant can only organise mail and save drafts for you to review.
Does my mail leave my computer?
Terndesk reads it from your computer and sends it nowhere. An AI agent you use may send what it reads to its own provider, so let it read only the mail you're happy to share with that provider.
The user guide has the details, and AI in Terndesk covers the AI built into the app.
Try it
Free for 14 days with everything working, the command line included (see pricing).