A SQLRsync integration for Chezmoi that handles installation, database synchronization, and automated backup scheduling.
Add to your .chezmoi.toml.tmpl:
[data.sqlrsync]
enabled = true
install_method = "github" # "github", "manual"
[[data.sqlrsync.databases]]
name = "staggered-repetition"
remote = "pnwmatt/staggered-repetition.db"
local_path = "~/.local/share/databases/staggered-repetition.db"
sync_mode = "subscribe" # "subscribe", "cron:push", "cron:pull"
subscribe_flags = "--waitIdle=10s"
enabled = trueThen run:
chezmoi apply- ✅ Automatic Installation: Downloads and installs SQLRsync CLI
- ✅ Smart Sync Modes: Subscribe, pull-only, or bidirectional sync
- ✅ Flexible Scheduling: File-change triggers, cron-style, or real-time
- ✅ Cross-platform: Linux (systemd), macOS (launchd) support
- ✅ Zero Downtime: No database locks or service interruption
- ✅ Version Control: Time-travel and rollback capabilities
subscribe: Real-time bidirectional sync using websocketscron:pull: Downloads latest version on a schedule for read-replicascron:push: Backup databases on a schedule
file_change_Xm: Push X minutes after file changesdaily_Xam/Xpm: Daily at specific timeweekly_X_Xam: Weekly on day X at time Xhourly: Every hourcron:X X X X X: Custom cron expression
See examples/ directory for complete configuration examples.