Export Apple iCloud Notes to Markdown files safely.
- Safe: Copies database before reading, uses read-only mode
- Complete: Exports text, formatting, and attachments
- Organized: Groups notes by folder with YAML frontmatter
# Using uv (recommended)
uv pip install .
# Or install in development mode
uv pip install -e ".[dev]"# Export all notes
uv run notesctl export -o ~/notes-backup
# Export specific folder
uv run notesctl export --folder "Work" -o ~/work-notes
# Preview without writing (safe)
uv run notesctl export --dry-run
# List notes
uv run notesctl list-notes
# List folders
uv run notesctl list-folders
# Show statistics
uv run notesctl statsThis tool prioritizes safety:
- Copy-first: Database files are copied to temp directory before reading
- Read-only: SQLite connection uses URI mode=ro
- SELECT only: All queries are validated to be SELECT statements
- Dry-run mode: Preview exports without writing files
# Install dev dependencies
uv pip install -e ".[dev]"
# Run tests
uv run pytest
# Run linter
uv run ruff check src tests
# Run type checker
uv run mypy src
# Format code
uv run ruff format src tests- macOS with Apple Notes
- Python 3.11+
- uv (recommended) or pip