Skip to content

Building from source

Roy Padina edited this page Oct 23, 2026 · 2 revisions

Building from source

Requires macOS 14+ (builds a universal Apple Silicon + Intel binary) and the Xcode command line tools (xcode-select --install). No Xcode project and no third-party dependencies.

git clone https://github.com/roypadina/ObsidianVaultGitWatcher.git
cd ObsidianVaultGitWatcher
./install.sh
  • ./install.sh builds, installs to /Applications, installs the LaunchAgent and (re)starts it. Re-run it after every change.
  • ./build.sh only builds build/ObsidianVaultGitWatcher.app.
  • ./build.sh dist also strips the binary and makes dist/ObsidianVaultGitWatcher.zip (the release asset).
  • Scripts/make_icons.sh regenerates the icons from Assets/icons/*.svg (needs brew install librsvg).

A build you make yourself isn't quarantined, so Gatekeeper doesn't prompt.

Tests

build/ObsidianVaultGitWatcher.app/Contents/MacOS/ObsidianVaultGitWatcher --selftest

Runs the scheduling tests and, against throwaway git repositories with throwaway bare remotes: config parsing and validation (including schema 1 files), the add / remove / reload / import flows behind Settings, and every vault setting (stage mode, ignored paths, message template, push target, error states, per-vault snooze and skip). It never touches your config or vaults. CI runs the same on every push and pull request.

Trying changes safely

OBSIDIAN_VAULT_GIT_WATCHER_CONFIG points the app at another config.json (state files then live next to it):

OBSIDIAN_VAULT_GIT_WATCHER_CONFIG=/tmp/ovgw-test/config.json \
  build/ObsidianVaultGitWatcher.app/Contents/MacOS/ObsidianVaultGitWatcher

Debug flags

Same binary, same functions the app uses, no GUI needed:

Flag Does
--status JSON status of every vault (disabled ones too)
--commit "msg" Commit and push (empty message = template)
--snooze-hours N, --snooze-tomorrow Snooze
--skip Skip the current changes
--check-now Run one scheduled check (may show a real dialog)
--vault NAME Narrow any flag to one vault (name, folder name or path); state-changing flags require exactly one
--snapshots DIR Render the README/wiki images (Settings panes, About, reminder dialog, menu bar states) off screen

Clone this wiki locally