Bootstrap Scripts: Your Team's Secret Weapon for Onboarding
A bootstrap script runs on first pull to a new machine, turning a bare OS into a fully configured development environment. Here's how to build one for your team.
What Bootstrap Scripts Are
A ConfigSync bootstrap script is a shell script stored at ~/.configsync/bootstrap.sh that runs automatically on the first pull to a new machine. It handles the one-time setup that config files alone cannot: installing package managers, system packages, applications, and development tools.
The bootstrap script is synced as part of your ConfigSync state. When you push, the script is included. When you pull on a fresh machine, ConfigSync detects that the machine has never been bootstrapped, prompts you to run the script, and executes it. One pull command transforms a bare operating system into your complete development environment.
How It Works
The bootstrap workflow is straightforward:
Configuration Options
You can customize bootstrap behavior in your ConfigSync configuration:
Setting auto_run: true is useful for automated provisioning where no human is present to confirm. For interactive setups, the default prompt adds a safety check so developers can review the script before it runs.
configsync pull --rerun-bootstrap.What to Put in a Bootstrap Script
A good bootstrap script is idempotent — running it twice produces the same result as running it once. Here is a complete example for a web development team:
Bootstrap vs. Post-Pull Hooks
Bootstrap scripts and post-pull hooks serve different purposes:
The bootstrap script runs once on first pull. It handles one-time setup: installing Homebrew, cloning repositories, configuring macOS defaults. These are actions that only need to happen when setting up a new machine.
Post-pull hooks run on every pull. They handle recurring actions: installing new Brewfile entries, reloading shell configuration, restarting services after config changes. These are actions that should happen whenever configuration is updated.
The combination is powerful: the bootstrap script gets a new machine to a working state, and post-pull hooks keep it current as the team's tools and configuration evolve.
Team Onboarding in One Command
With a well-crafted bootstrap script, onboarding a new developer looks like this: hand them a machine, have them install ConfigSync and log in, run configsync pull. The bootstrap script installs their tools, clones the repos, and sets up the databases. The pull restores the team's standard configuration. Post-pull hooks install any remaining dependencies.
What used to take two days of following a wiki and asking senior developers for help now takes the time it takes Homebrew to install packages. The new developer's first commit can happen on their first day.
Ready to try ConfigSync?
Sync your entire dev environment across machines in minutes. Free forever for up to 3 devices.