Skip to content

damienheiser/pickle-cider

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

20 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Pickle Cider

Version 2.0 - Native macOS tools for working with Apple Notes - sync, backup, and automatic version history.

Build from source required - macOS Full Disk Access requires apps to be code-signed. The build script automatically creates a local signing certificate for you.

What's Included

πŸ«™ Pickle Cider - GUI App

A beautiful SwiftUI app combining sync and version history.

  • Dashboard with stats at a glance
  • Browse all tracked notes
  • Drag & drop import/export
  • Control the Pickle daemon
  • Full Disk Access onboarding

🍺 Cider - CLI Sync Tool

Bidirectional sync between Apple Notes and markdown files.

cider pull ~/notes --recursive    # Export notes to markdown
cider push ~/notes/doc.md         # Upload to Apple Notes
cider sync ~/notes                # Bidirectional sync

πŸ₯’ Pickle - CLI Version History

Automatic version history with background daemon.

pickle install                    # Install background daemon
pickle history "My Note"          # View version history
pickle diff 1 2                   # Compare versions
pickle restore 5                  # Restore to version

Installation (Build from Source)

Requirements

  • macOS 13.0 (Ventura) or later
  • Xcode Command Line Tools (xcode-select --install)
  • Full Disk Access permission

Quick Install (Recommended)

# Clone the repository
git clone https://github.com/damienheiser/pickle-cider
cd pickle-cider

# Build and install everything
./Scripts/build-all.sh

This script will:

  1. Build all three executables (cider, pickle, PickleCider)
  2. Auto-create a local signing certificate if needed
  3. Sign all binaries properly
  4. Install the app to /Applications/Pickle Cider.app
  5. Install CLI tools to /usr/local/bin/
  6. Install and start the Pickle daemon for automatic version tracking

After running, you just need to grant Full Disk Access (see below).

Manual Build

# Clone and build
git clone https://github.com/damienheiser/pickle-cider
cd pickle-cider

# Build release binaries
swift build -c release

# Create signing certificate (if you don't have one)
./Scripts/create-signing-cert.sh

# Sign binaries
CERT="Pickle Cider Development"  # or your certificate name
codesign --force --sign "$CERT" .build/release/cider
codesign --force --sign "$CERT" .build/release/pickle
codesign --force --sign "$CERT" .build/release/PickleCider

# Install
sudo cp .build/release/cider .build/release/pickle /usr/local/bin/

Granting Full Disk Access

After installation, you must grant Full Disk Access to the components you want to use:

For the GUI App

  1. Open System Settings β†’ Privacy & Security β†’ Full Disk Access
  2. Click + and add /Applications/Pickle Cider.app
  3. Quit and reopen the app (required for changes to take effect)

For the Pickle Daemon (automatic version tracking)

The daemon runs in the background and needs its own FDA permission:

  1. In Full Disk Access, click +
  2. Press Cmd+Shift+G and enter: /Applications/Pickle Cider.app/Contents/MacOS/pickle
  3. Click Add, then restart the daemon: pickle stop && pickle start

For CLI Tools (Terminal)

If using cider or pickle from Terminal:

  1. Add Terminal.app (or your terminal app) to Full Disk Access
  2. Restart your terminal

Usage

GUI App (Pickle Cider)

Launch from Applications. The app will guide you through granting permissions on first launch.

CLI Tools

# Initialize Cider sync
cider init

# Export all notes to markdown
cider pull ~/Documents/notes --recursive

# Upload files to Apple Notes
cider push ~/Documents/notes/my-note.md

# Bidirectional sync
cider sync ~/Documents/notes --folder "My Synced Notes"

# Install Pickle daemon for automatic versioning
pickle install --interval 30

# Check status
pickle status

# View version history
pickle history "My Important Note"

# Compare versions
pickle diff 1 2

# Restore to previous version
pickle restore 5

# Export versions
pickle export "My Note" ~/exports --format md

Commands Reference

Cider Commands

Command Description
cider init Initialize sync state database
cider pull <dir> Export Apple Notes to markdown files
cider push <path> Upload files to Apple Notes
cider sync <dir> Bidirectional sync
cider status Show sync status

Cider Options

--folder <name>       Target Apple Notes folder (default: "Cider Sync")
--format <md|txt>     Output format (default: md)
--recursive           Process subdirectories
--dry-run             Preview without making changes
--force               Overwrite conflicts
--verbose             Verbose output

Pickle Commands

Command Description
pickle install Install launchd daemon
pickle uninstall Remove daemon
pickle start Start daemon
pickle stop Stop daemon
pickle status Show daemon status and statistics
pickle history <note> Show version history
pickle diff <v1> <v2> Compare versions
pickle restore <id> Restore to version
pickle export <note> <dir> Export versions to files

Pickle Options

--interval <seconds>  Check interval for daemon (default: 30)
--max-versions <n>    Max versions per note (default: 100)
--limit <n>           Limit results
--format <md|txt|json>  Export format
--verbose             Verbose output

Data Storage

Tool Location Purpose
Cider ~/.cider/state.db Sync state tracking
Pickle ~/.pickle/versions.db Version metadata
Pickle ~/.pickle/versions/ Version content (gzipped JSON)
Pickle ~/.pickle/logs/ Daemon logs

Technical Details

How It Works

  • Reading Notes: Direct SQLite access to Apple Notes database
  • Writing Notes: AppleScript via NSAppleScript (preserves iCloud sync)
  • Content Format: Notes are stored as gzip-compressed protobuf
  • Change Detection: Polling-based (SQLite WAL makes file watching unreliable)

Limitations

  • Password-protected notes cannot be accessed (skipped with warning)
  • Attachments are referenced but not synced
  • Requires Full Disk Access for database read access

Troubleshooting

"SQLite error 23: authorization denied"

Full Disk Access not granted or not applied yet.

  1. Check System Settings β†’ Privacy & Security β†’ Full Disk Access
  2. Ensure Pickle Cider and/or Terminal are listed and enabled
  3. Quit and reopen the app (macOS caches permissions)

App doesn't appear in Full Disk Access list

The app must be properly signed. Build with Xcode or sign manually with your development certificate.

Daemon not starting

# Check if daemon is installed
launchctl list | grep pickle

# View daemon logs
cat ~/.pickle/logs/stdout.log
cat ~/.pickle/logs/stderr.log

# Reinstall daemon
pickle uninstall
pickle install

License

MIT License - see LICENSE


Credits

Built with:

Inspired by:

About

Cider, Pickle & Pickle Cider - Native macOS tools for Apple Notes: bidirectional sync, version history, and a beautiful GUI app

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors