MacFlyv0.4.0

Migrations & Backups

Two-way migration pipelines between Apple Notes, Mail, Contacts, Reminders, Calendar, Safari, and local Markdown, CSV, JSON, JSONL, or HTML repositories.

Beyond connecting AI agents safely to macOS, MacFly is a deterministic migration and archival toolkit for moving personal and project data between Apple’s native apps and open file formats (Git-backed Markdown knowledge bases, Obsidian, DevMark, Notion, Evernote, Todoist, or CRM exports).

Every export produces clean Markdown files with structured YAML frontmatter, and every import generates a tamper-evident macfly plan (SHA-256 hash + interactive TTY approval + audit journal) rather than writing blindly.


Migration Matrix

Domain Export to Markdown + YAML Frontmatter Import via Verified macfly plan
Apple Notes macfly notes export --output <dir> (mirrors folder tree 1:1) macfly notes import --input <path> --folder <target> [--recursive] (.md, .txt, .html, .json, .jsonl, .csv)
Apple Mail macfly mail export --output <dir> (--account, --mailbox, --query, --unread) mail_create_draft via macfly plan create (with Apple Mail signature)
Apple Contacts macfly contacts export --output <dir> (--query, --limit) (Read, duplicate/empty audit & export)
Apple Reminders macfly reminders export --output <file.md> (- [ ] checklist) macfly reminders import --input <path> [--list <name>] (.md, .txt, .json, .jsonl, .csv)
Apple Calendar macfly calendar export --output <file.md> [--days 14] (Read, daily-brief & Markdown export)
Apple Safari macfly safari export --output <file.md> [--query <q>] macfly safari to-note --folder <target> (captures open tabs into an Apple Note)

1. Exporting out of Apple’s Ecosystem (to Markdown / Git)

Apple Notes → Markdown folder tree

# Export an entire folder branch with DLP redaction active
macfly notes export --output ./kb-notes --folder "10 · Work" --limit 500

# Export a full unredacted private backup
macfly notes export --output ./private-backup --limit 2000 --no-redact

Each note is saved at <output>/<folder_path>/<title>.md with YAML frontmatter:

---
title: "Q4 Architecture Review"
id: "x-coredata://.../ICNote/p412"
account: "iCloud"
folder: "10 · Work/Architecture"
modified_at: "2026-11-22T12:10:00Z"
revision: "sha256:9f86d081884c7d65"
---

Clean note body...

Apple Mail → Project email archive

# Archive all emails matching a client or invoice query
macfly mail export --output ./client-archive --query "Acme" --limit 50

# Export all unread inbox messages for offline/local-LLM triage
macfly mail export --output ./unread-triage --unread --limit 25

Apple Contacts → Markdown contact cards

macfly contacts audit
macfly contacts export --output ./contacts-kb --query "GmbH"

Apple Reminders, Calendar & Safari Tabs

macfly reminders export --output ./open-tasks.md
macfly calendar export --output ./next-2-weeks.md --days 14
macfly safari export --output ./open-research-tabs.md

2. Importing into Apple Notes & Reminders (Multi-Format)

MacFly’s built-in Rust parser (macfly_core::import) supports six input formats out of the box — with zero external runtime dependencies:

Format Extensions Recognized Structure Typical Sources
Markdown .md, .markdown YAML frontmatter (title:, folder:), leading # Heading, or - [ ] task lines Obsidian, Notion Markdown, Bear, DevMark
Plaintext .txt Leading # Heading or filename (Notes); line-by-line tasks (Reminders) Local text files, scratch lists
HTML .html, .htm <title> or <h1> + automatic HTML-to-clean-text conversion Evernote, Google Keep, Confluence, web clips
JSON .json Single object, [...] array, or {"notes": [...]} / {"tasks": [...]} (auto-maps title/name/subject/task & body/content/text/notes) Custom exports, API dumps
JSON Lines .jsonl One JSON note or task object per line Batch pipelines, LLM outputs
CSV (RFC 4180) .csv Header detection (title/name/task, body/content/notes/description, folder/list/project), including multiline quoted fields Notion databases, Airtable, Trello, Todoist, Excel/Numbers

Example: Migrate a folder of Markdown/HTML/CSV files into Apple Notes

# Recursively scan a directory and generate a verified change plan
macfly notes import --input ./obsidian-vault --folder "00 · Inbox" --recursive

# Or import a Notion / Airtable CSV export
macfly notes import --input ./notion-database.csv --folder "30 · Research"

MacFly prints the generated plan_id and 6-character approval_code. Review and apply it interactively:

macfly plan inspect <plan-id>
macfly plan approve <plan-id>
macfly plan apply <plan-id>

Example: Migrate tasks from Todoist / Trello CSV or Markdown into Apple Reminders

macfly reminders import --input ./todoist-export.csv --list "Work"
macfly reminders import --input ./roadmap-checklist.md --list "Projects"

Example: Capture open Safari tabs directly into an Apple Note

When a research session leaves 30 open tabs in Safari, capture them into a single structured Apple Note via plan:

macfly safari to-note --folder "30 · Research" --title "Rust & macOS Research Links"

Edit this page on GitHub · Docs for v0.4.0