An installer script for Homebrew, other system dependencies, and important configuration files
- A UNIX-ish operating system, one of:
- macOS (tested with macOS Sonoma 14.7)
- Debian (tested with
bookworm
in Visual Studio Code's Development Containers) - Others (untested)
- dash or other POSIX-compatible shell (
/bin/sh
) - Bash (for Homebrew installation)
- Zsh (for additional installation scripts)
- curl (for automatic bootstrapping)
- git (for manual installation)
sh, Bash, Zsh, and curl are pre-installed on macOS.
The installer script installs Homebrew, clones this repository to ~/.dotfiles
, links important
configuration files ("dotfiles") into their respective locations, and installs additional system
dependencies using Homebrew Bundle.
Run the following command to download and execute the bootstrap script.
/bin/sh -c "$(curl -fsSL https://github.com/jarrodldavis/dotfiles/raw/main/install.sh)"
You can manually clone this repository and run the install.sh
script from that repository.
git clone https://github.com/jarrodldavis/dotfiles.git ~/.dotfiles
cd ~/.dotfiles
./install.sh
Alternatively, you can copy the contents of install.sh
to a file on disk and run it using
sh ./install.sh
.
Important
The installer script always clones this repository to ~/.dotfiles
, even if it was
manually cloned to a different location.
All installer options are specified as environment variables. Unless otherwise specified, the presence of an environment variable with a non-empty value enables the corresponding option; the option is disabled otherwise.
DOTFILES_REINSTALL=1 DOTFILES_SKIP_MAS=1 ./install.sh
Warning
The installer script only checks for any non-empty value in an environment variable, so even
typically "falsy" values like 0
or NO
will enable the option.
Force the removal and reinstallation of Homebrew and all Homebrew Formulae.
Homebrew Casks are not fully removed, but will be adopted or overwritten upon reinstallation. Visual Studio Code extensions will not be removed, but any missing extensions will be reinstalled.
On macOS, skip installation of Mac App Store (mas
) dependencies.
Note
These maintenance actions are performed automatically on macOS before each commit using a git pre-commit hook.
Homebrew Bundle is used to record the CLI tools (Homebrew Formulae), GUI applications
(Homebrew Casks), and Visual Studio Code extensions that should be installed. To record the
installation or removal of these system dependencies, update configs/Brewfile
using
~/.dotfiles/scripts/update-homebrew-bundle.sh
.
configs/gitignore
can be updated to use the latest templates from github/gitignore
using
~/.dotfiles/scripts/update-global-gitignore.sh
.