Short answer
Install fm-cli with omarchy pkg add fm-cli, sign in once with fm-cli auth login, and open the mail app with bare fm-cli. The CLI is free and open source, but it only talks to Fastmail: Individual is $60 a year after a 30-day free trial, with no free plan.
fm-cli on Omarchy
fm-cli is a small, fast terminal client for Fastmail: a full-screen mail app plus scriptable JSON commands and a live watch, built on Fastmail's JMAP API — and it is the engine behind the Fastmail plugin for Omarchy.
TL;DR
omarchy pkg add fm-cli
fm-cli auth login
fm-cli
That installs fm-cli (6.6 MB download, 17.5 MB installed, MIT, version 0.3.6-1). fm-cli auth login opens Fastmail's consent page in your browser once; after that the tokens live in your system keyring and refresh themselves. Bare fm-cli opens the full-screen mail app. The CLI itself is free and open source, but it only talks to Fastmail: Fastmail Individual is $60 a year ($5 a month billed yearly) after a 30-day free trial, and there is no free plan.
Getting started (5 minutes)
1. Sign in.
Run fm-cli auth login. It opens Fastmail's consent page in your browser; approve fm-cli there and you are done — no token to copy. Fastmail lists the authorization under Settings → Privacy & Security → Connected apps, where you can revoke it. Prefer an API token instead? Create one under Settings → Privacy & Security → Integrations → API Tokens with the Email scope (add Email submission to send), then run fm-cli auth login --token. Check the session any time with fm-cli auth status (no network call) and sign out with fm-cli auth logout.
2. Open the TUI.
Run fm-cli. It opens on a main menu: 0 main menu, 1 Mail, 2 Calendar, 3 Contacts, 4 Settings, 5 About. Move with j/k or arrows, Enter to open, h or Esc to go back, / to filter (or search all mail from the main menu), q to quit from the main menu. In the mail list: c composes, e archives, d deletes, u toggles read/unread, f flags. While reading: R replies, A replies all, F forwards, b opens the HTML in your browser, i loads images inline.
3. Three things worth doing in the first session:
- Try the scriptable commands. Every command takes
--jsonand prints exactly one JSON object, so mail is pipeable into scripts:fm-cli box view inbox --limit 20 --jsonlists threads newest first, andfm-cli box view all --jsonmerges the newest inbox threads with every unseen thread in your other folders (handy because Fastmail server rules file mail into folders without it ever touching the inbox).fm-cli watchprints one JSON line per mailbox change, live. - Set up calendar and contacts. Mail works on the API token or OAuth alone, but calendar and contacts use CalDAV and CardDAV, which need a Fastmail app password with Mail, Contacts & Calendars access. Store it with
fm-cli auth dav;fm-cli debugreports the DAV status. - Pick your sending identity. By default, composes go out from the first identity Fastmail returns, which is not necessarily the default you picked in the Fastmail web UI. Set yours with
fm-cli settings from me@example.com(orFM_DEFAULT_FROMin the environment, which wins over the stored setting). In the composer,Tabstill cycles through your other identities.
Common issues & fixes
"No calendars found" or "No address books found"
Calendar and contacts need a Fastmail app password — the API token alone does not cover CalDAV/CardDAV.
Fix: Create an app password in Fastmail with Mail, Contacts & Calendars access and store it with fm-cli auth dav, then check with fm-cli debug. (Documented in the project README troubleshooting section; not reproduced on a live machine.) (fm-cli README)
Images do not show inline in a message
Inline images need a terminal that supports Sixel, the Kitty graphics protocol, or iTerm2 images (Kitty, WezTerm, foot, iTerm2, mlterm). Ghostty, the Omarchy default, is not on that list.
Fix: On a stock Omarchy setup press b instead to open the message HTML in your browser. (Documented in the project README troubleshooting section; not reproduced on a live machine.) (fm-cli README)
another fm-cli watch is already running
Fastmail allows one push connection per sign-in, so a second watch refuses to start rather than knocking the first offline.
Fix: Stop the other watch, or let it be the one — the Omarchy Fastmail plugin's watch is normally the one running. (Documented in the project README troubleshooting section; not reproduced on a live machine.) (fm-cli README)
Sign-in fails with invalid_target
You are on an older fm-cli. Version 0.3.0 and later send the resource parameter Fastmail requires.
Fix: Update with omarchy pkg add fm-cli (or your package manager) and sign in again. (Documented in the project README troubleshooting section; not reproduced on a live machine.) (fm-cli README)
Mail goes out from the wrong address
fm-cli sends from the first identity Fastmail's API returns, not the default you picked in the web UI.
Fix: Set the one you want with fm-cli settings from me@example.com, or export FM_DEFAULT_FROM=me@example.com — the environment variable wins over the stored setting. (Documented in the project README; not reproduced on a live machine.) (fm-cli README)
Pairs well with / If you hate this, try
Pairs well with
- The Fastmail plugin for Omarchy (fm-cli is its engine — its watch keeps your mailbox live), shell scripts and cron jobs (every command prints one JSON object, so
box view all --jsonplusjqis a daily digest in one line), and your$EDITOR(composing happens in your editor, with contact autocomplete and a choice of sending identity).
If you hate this, try
- If you hate the paid-account requirement: hey-cli gives you the same terminal-mail idea for HEY ($99 a year, also paid), while aerc or neomutt give you terminal email with any IMAP provider for free — including a free Gmail account. If you like Fastmail but not the terminal, the Fastmail web app and mobile app are included in every plan.
Comparison: fm-cli vs hey-cli vs aerc vs neomutt vs Thunderbird
| fm-cli | hey-cli | aerc | neomutt | Thunderbird | |
|---|---|---|---|---|---|
| Price | Free CLI (MIT); Fastmail Individual $60/yr, no free plan | Free CLI (MIT); HEY $99/yr, no free plan | Free | Free | Free |
| Best for | Fastmail users who want mail, calendar, and contacts in the terminal, plus scriptable JSON | HEY users who want mail, calendar, and journal in the terminal, plus agent access | Terminal email with any IMAP account, fast and minimal | A classic terminal mail client with deep keyboard control | A full GUI mail client with any provider, including Gmail |
| Omarchy install | omarchy pkg add fm-cli | omarchy pkg add hey-cli | omarchy pkg add aerc (unverified, check the store) | omarchy pkg add neomutt (unverified, check the store) | omarchy pkg add thunderbird (unverified, check the store) |
Verdict: Pick fm-cli if you already pay for Fastmail and want your inbox in the terminal — especially if you want to script against it, since the JSON output and live watch are the point. Pick aerc or neomutt if you want terminal email on the address you already own, for free.
How to switch from Gmail to Fastmail + fm-cli (~15 minutes)
- Export from Gmail: Fastmail's import tool walks you through moving mail, contacts, and calendars from Gmail; there is also a migration guide and free migration support. Nothing to export by hand first.
- Import into Fastmail: point the import tool at your Gmail account and let it copy everything in. Your Fastmail address can be anything on your own domain, or a free fastmail.com address.
- Set up fm-cli: install it with
omarchy pkg add fm-cli, sign in withfm-cli auth login, and store an app password withfm-cli auth davfor calendar and contacts. - What doesn't transfer: Gmail labels become folders, and Gmail-specific features (categories, confidential mode) have no Fastmail equivalent. Your mail, contacts, and calendars all come across.
- Time estimate: about 15 minutes to set up the import, plus however long the copy takes in the background.
Open the fm-cli package
See the live version, upstream screenshot, requirements, source and exact Omarchy install command.
Frequently asked questions
Does fm-cli work with Gmail?
No. It only talks to Fastmail's JMAP API. If you want terminal email on Gmail, use aerc or neomutt with IMAP instead.
Is Fastmail free?
No. Individual is $60 a year ($5 a month billed yearly), Basic is $36 a year, both after a 30-day free trial. There is no free plan.
Where does fm-cli store my login?
In the system keyring only — Secret Service, KWallet, Keychain, or Windows Credential Manager — as one record holding the access token, the rotating refresh token, and their expiry. Never in a file. For headless machines, FM_API_TOKEN, FM_EMAIL, and FM_APP_PASSWORD in the environment stand in for the keyring.
Can I use fm-cli offline?
Yes, for mail only. Run fm-cli settings offline on to cache mail and bodies locally in ~/.config/fm-cli/emails.db, draft offline, and push queued changes later with fm-cli sync. Calendar and contacts need a connection. If you started offline and want to go online, restart the app.
What is fm-cli watch for?
It holds a JMAP push connection open and prints one JSON line per mailbox change — new mail, updates, deletes — as they happen. It is the same mechanism the Omarchy Fastmail plugin uses, and Fastmail allows only one push connection per sign-in.
Is fm-cli affiliated with Fastmail?
No. It is an independent project by Nine Point Labs, MIT licensed, and not affiliated with Fastmail.
Official sources
- Omarchy package listing: fm-cli (Utilities, MIT, 6.6 MB download / 17.5 MB installed, version 0.3.6-1, updated 2026-11-25)
- fm-cli README (install, sign-in, TUI keys, scripting, security, offline mode, troubleshooting)
- Fastmail pricing (Individual $60/yr, Basic $36/yr, 30-day free trial, no free plan)
- HEY CLI pricing comparison ($99/yr, no free plan) — see the hey-cli guide
Commands and fixes verified against official sources November 2026; on-machine verification pending.