| name | check-email |
| description | Check and manage email using himalaya CLI. Use when user asks to check email, read email, list unread, archive messages, or says "/check-email". |
| tools | Bash |
CLI Email (himalaya)
Manage email from the command line using himalaya with local Maildir sync via mbsync.
Accounts
| Name | Provider | Usage |
|---|
personal | Fastmail (default) | Personal email |
oddball | Google Workspace | Work/VA email |
The default account is personal. Use -a oddball for work email.
Prerequisites
himalaya must be installed and configured. If any command fails with "command not found", suggest running /setup-email.
Email is synced to local Maildir (~/Mail/) via mbsync + IMAP IDLE (near-instant). Himalaya reads from local Maildir — no network needed for reading.
Commands
List inbox (unread envelopes)
himalaya envelope list
himalaya envelope list -a oddball
himalaya envelope list -f Sent
himalaya envelope list -f "[Gmail]/Sent Mail" -a oddball
Read a message
himalaya message read <id>
himalaya message read <id> -a oddball
Mark as read
himalaya flag add <id> seen
himalaya flag add <id> seen -a oddball
Archive messages
Use the mail-archive script (not raw himalaya move) — it handles UID stripping for mbsync compatibility:
mail-archive <id> [id...]
mail-archive -a oddball <id> [id...]
Sync email manually
mbsync -a
mbsync personal
mbsync work
mail-sync -a
Search email
Use qmd for full-text search across all indexed email:
qmd search "quarterly report" -c email
qmd query "emails about the server migration timeline" -c email -n 5
qmd query "meeting with Alex about deployment"
Send email
himalaya message write
echo "Message body" | himalaya message write --to "recipient@example.com" --subject "Subject"
Behavior
- When the user says "check email" or "check my email", list both inboxes (personal first, then work) and summarize unread
- Present unread messages in a clean, readable format — show sender, subject, and date
- When reading messages, extract the key content and summarize if lengthy
- Offer follow-up actions: archive, mark as read, reply
- Use
mail-archive for archiving (never use raw himalaya message move — it causes mbsync UID conflicts)
- When searching, prefer
qmd query for natural language queries and qmd search for specific keywords
- If himalaya is not installed, suggest running
/setup-email to set up the full email stack