Automating Everything: Hooks + Bootstrap + Watch Mode Together
Watch mode detects changes. Pre-push hooks capture dependencies. Post-pull hooks install packages. Bootstrap handles first-time setup. Together, they create a self-maintaining development environment.
Three Features, One Workflow
ConfigSync has three automation features that each solve a different problem. Used individually, they are convenient. Combined, they create something transformative: a development environment that maintains itself across every machine you own.
Watch mode monitors your config files and pushes automatically when they change. Hooks run commands before and after push/pull operations.Bootstrap scripts handle first-time machine setup. Here is how to wire them all together.
The Complete Chain Reaction
You edit ~/.zshrc on your work laptop. Here is what happens automatically:
You edited one file. The dependencies were captured, the push happened, and every other machine got the update along with any new packages.
The Configuration
Here is the complete config.yaml that powers this workflow:
How Watch Mode Triggers the Chain
Watch mode is the entry point. Start it in the background and forget about it:
The debounce setting is important. When you are actively editing a file, watch mode waits for 5 seconds of inactivity after the last save before triggering a push. This prevents rapid-fire pushes during an editing session while still capturing changes promptly when you are done.
Hooks: Capture Before Push, Install After Pull
The key pattern is that pre-push hooks and post-pull hooks form pairs. Whatever you capture before pushing, you install after pulling:
Pre-push hooks capture the current state of package managers and tool inventories. Post-pull hooks take those captured lists and install anything missing. This keeps not just your configs in sync, but your entire tool set.
Bootstrap: The Foundation Layer
Bootstrap scripts handle what hooks cannot: installing the tools themselves. On a new machine, brew bundle install fails if Homebrew is not installed. Bootstrap runs before the first pull and sets up the prerequisites.
The detect field makes bootstrap idempotent. If Homebrew is already installed, that step is skipped. This means bootstrap is safe to run on existing machines — it only installs what is missing.
Think of it as three layers: bootstrap installs package managers, pull brings your configs and dependency lists, and post-pull hooks install your packages. Each layer builds on the previous one.
The Zero-Touch Result
Once configured, your development environment is fully automated. Edit a config and it propagates. Install a new VS Code extension and it appears on your other machines. Set up a brand-new laptop and everything installs itself. The initial 30-minute configuration investment pays off every single day.
Ready to try ConfigSync?
Sync your entire dev environment across machines in minutes. Free forever for up to 3 devices.