MacFlyv0.4.0

CASOONopen source · Rust + AppleScript/JXA

Safe, deterministic macOS automation & migration.

MacFly puts a read-side data firewall, SHA-256 plan approval, and two-way migration pipelines between AI agents (or local Markdown knowledge bases) and your Apple Notes, Mail, Contacts, Calendar, Reminders, Safari, and Shortcuts.

Pure Rustcrates.iorunemark UIDLP FirewallMigrationsSHA-256 PlansMCP stdioMIT / Apache-2.0
cargo install macfly
macfly doctor
macfly notes export --output ./backup
macfly doctor & plan create · styled with runemark
$ macfly doctor
✓ MacFly Doctor

  OS: macos   osascript: OK   Config: ~/.config/macfly/config.json (loaded)   Profile: default

• macOS Adapters (2)
  ✓ Apple Notes: ok (1 account, 240 notes)
  ✓ Apple Mail: ok (2 accounts, 14 unread, 2 signatures)

$ macfly plan create --input cleanup.json
! Change Plan plan-1795352400-8f4a21c0

  Status: PendingApproval   Risk: Medium   Approval code: 8F4A21

• Planned operations (3)
  • [notes.move] Note 'Q4 Roadmap' → '10 · Work/Projects'
  • [mail.create_draft] Draft to team@example.org (Apple Mail signature)
  • [shortcuts.run] Shortcut 'Office Focus' (allowlisted)

Next steps:
  - Review and approve interactively
    $ macfly plan approve plan-1795352400-8f4a21c0
Notes, Mail, Contacts, Calendar, Reminders, Safari, and Shortcuts under one typed CLI & MCP
7 macOS apps
two-way migrations across Markdown, Plaintext, HTML, JSON, JSONL, and RFC-4180 CSV
6 formats
canonical plan hash binding with interactive TTY approval and JSONL audit journal
SHA-256
100% Rust core + stdin-only JXA — no Swift toolchain, no Xcode project, no private DB hacks
0 SDK drift

Safety & migration lifecycle

No blind writes — every change and import goes through four steps

Whether triggered by a multi-format migration, a local LLM, an MCP client, or a shell script, mutations are validated, hashed, reviewed, and journaled.

  1. Step 1

    plan.json / import

    Propose or import

    An agent proposes operations over MCP, or notes/reminders import parses .md, .csv, .json, .html files.

  2. Step 2

    sha256 + 0600

    Validate & hash

    Rust checks scopes, allowlists, and revisions, then locks the plan with a SHA-256 hash and TTL.

  3. Step 3

    TTY + 6-char code

    Approve

    You review the runemark plan report in an interactive terminal and confirm the hash code.

  4. Step 4

    journal.jsonl

    Apply & audit

    MacFly verifies integrity pre-flight, executes losslessly, and appends every result to the audit log.

Why Rust + AppleScript/JXA — for AI agents and migrations alike

TopicDirect provider integrationCloud OAuth ConnectorsLocal-first on macOSMacFly + Local AIPrivacy-first
Mail & app coverageUsually Gmail or Microsoft 365 only; separate OAuth setup per account.Every account in Apple Mail (iCloud, Gmail, Exchange, custom IMAP) plus Notes, Contacts, Calendar, Reminders, Safari & Shortcuts.
Migrations & backupsLocked into vendor cloud silos.Two-way Markdown/CSV/JSON/HTML pipelines for Git knowledge bases, Obsidian, Notion, and local archives.
Data residencyEmails and notes are transmitted to cloud AI servers.100% local on Apple Silicon with Ollama/MLX; DLP firewall when using cloud models.
Write & send safetyBroad OAuth scopes (Mail.Send) exposed to indirect prompt injection.Drafts by default, SHA-256 plan approval in interactive TTY, MCP read + plan-only.

Mail & app coverage

Cloud OAuth ConnectorsUsually Gmail or Microsoft 365 only; separate OAuth setup per account.

MacFly + Local AIEvery account in Apple Mail (iCloud, Gmail, Exchange, custom IMAP) plus Notes, Contacts, Calendar, Reminders, Safari & Shortcuts.

Migrations & backups

Cloud OAuth ConnectorsLocked into vendor cloud silos.

MacFly + Local AITwo-way Markdown/CSV/JSON/HTML pipelines for Git knowledge bases, Obsidian, Notion, and local archives.

Data residency

Cloud OAuth ConnectorsEmails and notes are transmitted to cloud AI servers.

MacFly + Local AI100% local on Apple Silicon with Ollama/MLX; DLP firewall when using cloud models.

Write & send safety

Cloud OAuth ConnectorsBroad OAuth scopes (Mail.Send) exposed to indirect prompt injection.

MacFly + Local AIDrafts by default, SHA-256 plan approval in interactive TTY, MCP read + plan-only.

Get started in two minutes

Install from crates.io, verify macOS permissions, and audit, automate, or migrate your Apple apps.

  1. Install the binary: cargo install macfly
  2. Check macOS access & create config: macfly doctor · macfly config init
  3. Audit & clean up: macfly notes audit · macfly contacts audit
  4. Export or import: macfly notes export --output ./backup · macfly notes import --input ./docs --folder "00 · Inbox" --recursive
  5. Connect an MCP client: point stdio to macfly mcp --profile default
Terminal, migrations & MCP setup
# 1. Install from crates.io & verify macOS access
cargo install macfly
macfly doctor
macfly config init

# 2. Audit & reorganize Notes, Mail, Contacts, Calendar, Reminders & Safari
macfly notes audit
macfly contacts audit
macfly mail overview
macfly safari tabs
macfly context daily-brief

# 3. Migrate & back up (Markdown, CSV, JSON, JSONL, HTML)
macfly notes export --output ./notes-backup --folder "10 · Work"
macfly notes import --input ./notion-or-evernote --folder "00 · Inbox" --recursive
macfly mail export --output ./mail-archive --query "Invoice"
# 4. Cross-app 360° dossiers, Typst reports, SKILL.md & launchd schedules
macfly context person "Acme"
macfly context meeting-prep --query "Kickoff" --create-note
macfly context weekly-review
macfly report person "Acme" --output ./dossier-acme.typ
macfly skill export --output ./.claude/skills/macfly