patto-gcal-sync
January 21, 2026 ยท View on GitHub
Synchronize Patto task deadlines to Google Calendar.
Features
- โ Sync Patto tasks with deadlines to Google Calendar events
- ๐ Automatic OAuth 2.0 authentication
- ๐ Dry-run mode to preview changes
- ๐ Track sync state to avoid duplicates
Installation
cargo install patto-gcal-sync
Or build from source:
git clone https://github.com/ompugao/patto-gcal-sync
cd patto-gcal-sync
cargo install --path .
Setup
1. Get Google OAuth Credentials
- Go to Google Cloud Console
- Create a new project (or select existing)
- Enable the Google Calendar API
- Go to Credentials โ Create Credentials โ OAuth 2.0 Client ID
- Choose Desktop app as application type
- Download the credentials
2. Configure patto-gcal-sync
Add to ~/.config/patto/patto-lsp.toml:
[google_calendar]
client_id = "your-client-id.apps.googleusercontent.com"
client_secret = "your-client-secret"
calendar_id = "primary" # or specific calendar ID
3. Authenticate
patto-gcal-sync auth
This will open a browser window for you to authorize the application.
Usage
Sync tasks to calendar
# Preview what will be synced
patto-gcal-sync sync --dry-run
# Actually sync
patto-gcal-sync sync
# Sync from specific directory
patto-gcal-sync --path ~/notes sync
Show configuration
patto-gcal-sync config
Revoke credentials
patto-gcal-sync revoke
How it works
- Scans your Patto repository for tasks with deadlines:
!2024-12-31- Todo*2024-12-31- In progress-2024-12-31- Done
- Creates all-day Google Calendar events for each task
- Maintains sync state in
.patto/gcal_state.jsonto track synced tasks - Updates event titles when tasks change
- Marks events as completed when tasks are marked done
Troubleshooting
"No credentials found" - Run patto-gcal-sync auth first
"Token expired" - The tool automatically refreshes tokens; if this fails, run patto-gcal-sync auth again
"Missing client_id or client_secret" - Check your ~/.config/patto/patto-lsp.toml configuration
Related
- Patto - The main note-taking system
License
MIT