A Ruby CLI tool to export Apple Notes to Markdown files.
- macOS (uses AppleScript to access Notes)
- Ruby 3.0+
- Bundler
bundle installbundle exec bin/apple-notes-exporter foldersExport all notes:
bundle exec bin/apple-notes-exporter exportExport from a specific folder:
bundle exec bin/apple-notes-exporter export --folder "Work"Export with date filters:
bundle exec bin/apple-notes-exporter export --from 2024-01-01
bundle exec bin/apple-notes-exporter export --to 2024-12-31
bundle exec bin/apple-notes-exporter export --from 2024-01-01 --to 2024-06-30Export to a custom directory:
bundle exec bin/apple-notes-exporter export --output ./my-notesCombine all notes into a single file (ordered oldest to newest):
bundle exec bin/apple-notes-exporter export --combine
bundle exec bin/apple-notes-exporter export --combine --combine-filename "all_notes.md"| Option | Alias | Description |
|---|---|---|
--folder |
-f |
Filter by folder name |
--from |
Filter notes created on or after this date (YYYY-MM-DD) | |
--to |
Filter notes created on or before this date (YYYY-MM-DD) | |
--output |
-o |
Output directory (default: ./export) |
--combine |
-c |
Combine all notes into a single file |
--combine-filename |
Filename for combined output (default: combined_notes.md) |
|
--no-images |
Exclude images from exported markdown |
Export work notes from Q1 2024:
bundle exec bin/apple-notes-exporter export \
--folder "Work" \
--from 2024-01-01 \
--to 2024-03-31 \
--output ./work-notes-q1Create a combined archive of all personal notes:
bundle exec bin/apple-notes-exporter export \
--folder "Personal" \
--combine \
--combine-filename "personal_archive.md"Individual notes are exported as Markdown files with:
- Filename format:
YYYYMMDD_Note_Title.md - Title as H1 heading
- HTML content converted to Markdown
Combined output includes:
- Notes separated by horizontal rules (
---) - Creation date metadata at the end of each note
- Notes ordered from oldest to newest
On first run, macOS will prompt you to grant terminal access to Notes. Allow this to enable the export functionality.
bundle exec rake testbundle exec rubocopMIT