AgentSkillsCN

apple-mail-exporter

通过关键词、发件人或主题,在Apple Mail的本地数据库中搜索并导出邮件。当用户希望查找特定邮件、导出邮件归档,或在不打开图形界面的情况下从Mail.app中提取消息时使用。支持交互模式、输出目录控制,以及批量导出时的结果数量限制。

SKILL.md
--- frontmatter
name: apple-mail-exporter
description: >
  Search and export emails from Apple Mail's local database by keyword, sender, or subject.
  Use when the user wants to find specific emails, export mail archives, or extract messages
  from Mail.app without opening the GUI. Supports interactive mode, output directory control,
  and result limiting for bulk exports.

apple-mail-exporter

Search and export emails from Apple Mail's local database.

Install

bash
brew install aayush9029/tap/apple-mail-exporter

Usage

bash
# Interactive mode
apple-mail-exporter

# Search by keywords (subject, sender address, sender name)
apple-mail-exporter "invoice" "receipt"

# List matching emails without exporting
apple-mail-exporter "newsletter" --list-only

# Export to a specific directory with a limit
apple-mail-exporter "project update" -o ~/exports -l 50

Options

FlagDescriptionDefault
-o, --output <dir>Output directoryoutput
-l, --limit <n>Max emails to export (0 = all)0
--list-onlyList matches without exporting
-i, --interactiveInteractive mode
--mail-dir <dir>Override Mail V* directory
--mail-base <dir>Override Mail base directory