Version 1.3.0
Export Apple Notes to HTML, Markdown, PDF, and Word with images intact. Search across notes by text, date, or AI-powered semantic similarity. Edit markdown locally and sync changes back to Apple Notes.
Thanks to @sulkaharo for performance optimizations and feature improvements!
Works on macOS only (uses AppleScript). Requires the Notes app.
- Released under MIT license
- Release History
- Possible future features
| Guide | For | Covers |
|---|---|---|
| Basic Guide | Getting started | Export, search, scheduling, reconciliation |
| Advanced Guide | Power users | Bidirectional sync, AI search, Qdrant, JSON output |
| Technical Reference | Developers | All CLI options, env vars, JSON schemas, file structure |
# Install
brew install git python
git clone https://github.com/storizzi/notes-exporter.git
cd notes-exporter
pip install -r requirements.txt
# Export all notes to Markdown
chmod +x exportnotes.zsh
./exportnotes.zsh --convert-markdown
# Search your notes
python query_notes.py "meeting notes"
python query_notes.py --modified-within 7d -l "."Output goes to ~/Downloads/AppleNotesExport/ by default.
Export from Apple Notes to multiple formats:
- Raw HTML, processed HTML (with extracted images), plain text
- Markdown (for Obsidian, etc.), PDF, Word (DOCX)
- Incremental — only re-exports changed notes (~3x faster than full export)
Search across all exported notes:
- Text and regex search with context, date filtering, image filtering
- AI-powered semantic search via Qdrant vector database
Sync changes back to Apple Notes:
- Edit exported markdown files locally, push changes back
- Conflict detection with
.conflict.mdsidecars - Create new Apple Notes from local markdown files
Manage your note collection:
- Reconciliation to find orphans, missing files, and mismatches
- Qdrant vector indexing for semantic search
- Scheduled automatic exports via launchd
- Machine-readable JSON Lines output from all commands
Edit exported markdown locally, then sync back to Apple Notes with --sync or --sync-only. Conflict detection creates .conflict.md sidecars. Create new notes with --create-new.
Semantic search using Ollama embeddings and Qdrant vector database. --ai-search "cooking ideas" finds recipe notes even without matching keywords. Incremental indexing with --update-qdrant.
Full-text search with regex (-E), date filtering (--modified-within 3d), image filtering (--has-images), and folder filtering (-F Notes).
reconcile.py compares counts across Apple Notes, tracking JSON, disk files, and Qdrant. --details pinpoints specific exceptions.
--no-overwrite, --modified-after DATE, --images-beside-docs, --html-wrap, --dedup-images.
--venv-dir .venv replaces conda. --conda-env still works (maps to venv with deprecation warning).
All commands support --json-log for machine-readable output.
Sync requires fullNoteId in tracking JSON. Run a full re-export after upgrading:
./exportnotes.zsh --update-all --convert-markdownSee RELEASES.md for full details.
brew install git pythonOptional (for specific features):
- Google Chrome — for PDF conversion
- Pandoc — for Word conversion (
brew install pandoc) - Docker + Ollama — for AI search (setup guide)
git clone https://github.com/storizzi/notes-exporter.git
cd notes-exporter
pip install -r requirements.txt
chmod +x exportnotes.zsh./exportnotes.zsh --convert-markdownmacOS will prompt for Notes app permissions on first run.
# Run all tests (258 tests)
pytest -v
# By category
pytest -m unit # Fast unit tests
pytest -m integration # Subprocess-based integration tests
pytest -m search # Search features
pytest -m sync # Bidirectional sync
pytest -m qdrant # Qdrant vector DB
pytest -m reconcile # Reconciliation
pytest -m export # Export features
pytest -m json_output # JSON output
# Via test runner
tests/test.zsh # All tests
tests/test.zsh search # Just search testsAll tests use isolated temp directories — never touches your live data.
