π¦ ClawHub
Apple Mail Search Safe (fruitmail)
by @gumadeiras
Apple Mail search on macOS with fast metadata and full body lookup. Use for finding messages in Mail.app by subject/sender/recipient/date, opening messages,...
TERMINAL
clawhub install apple-mail-search-safeπ About This Skill
name: apple-mail-search description: "Apple Mail search on macOS with fast metadata and full body lookup. Use for finding messages in Mail.app by subject/sender/recipient/date, opening messages, and reading full body text. " homepage: https://clawdhub.com/gumadeiras/apple-mail-search-safe repository: https://github.com/gumadeiras/fruitmail-cli metadata: {"clawdbot":{"emoji":"π§","requires":{"bins":["fruitmail"]},"install":[{"id":"node","kind":"node","package":"apple-mail-search-cli","bins":["fruitmail"],"label":"Install fruitmail CLI (npm)"}]}}
Fruitmail (Fast & Safe)
Fast SQLite-based search for Apple Mail.app with full body content support.
Installation
npm install -g apple-mail-search-cli
Usage
# Complex search
fruitmail search --subject "invoice" --days 30 --unreadSearch by sender
fruitmail sender "@amazon.com"List unread emails
fruitmail unreadRead full email body (supports --json)
fruitmail body 94695Open in Mail.app
fruitmail open 94695Database stats
fruitmail stats
Commands
| Command | Description |
|---------|-------------|
| search | Complex search with filters |
| sender | Search by sender email |
| unread | List unread emails |
| body | Read full email body (AppleScript) |
| open | Open email in Mail.app |
| stats | Database statistics |
Search Options
--subject Search subject lines
--days Last N days
--unread Only unread emails
--limit Max results (default: 20)
--json Output as JSON
--copy Copy DB before query (safest mode)
Examples
# Find bank statements from last month
fruitmail search --subject "statement" --days 30Get unread emails as JSON
fruitmail unread --json | jq '.[] | .subject'Find emails from Amazon
fruitmail sender "@amazon.com" --limit 50
Performance
| Method | Time for 130k emails | |--------|---------------------| | AppleScript (full iteration) | 8+ minutes | | SQLite (this tool) | ~50ms |
Technical Details
~/Library/Mail/V{9,10,11}/MailData/Envelope Index--copy mode availableNotes
himalaya skill (IMAP/SMTP)Source
https://github.com/gumadeiras/fruitmail-cli
π‘ Examples
# Find bank statements from last month
fruitmail search --subject "statement" --days 30Get unread emails as JSON
fruitmail unread --json | jq '.[] | .subject'Find emails from Amazon
fruitmail sender "@amazon.com" --limit 50
π Tips & Best Practices
himalaya skill (IMAP/SMTP)