Macsetup automates the installation, configuration, and verification of various tools and applications on a macOS system using Homebrew. It leverages a JSON configuration file to define the tools to be installed, their installation commands, verification commands, and additional metadata. This makes it easy to distribute and manage tool installations across multiple systems.
- Download Configuration: The script first tries to download the
config/tools.jsonfile into the~/.macsetupdirectory if it is not already present. - Read Configuration Files: If the
tools.jsonfile is present, the script uses all*.jsonfiles in the~/.macsetupdirectory to read the configuration and install the software. - Skip Certain Files: Any file that ends with
*.json.dwill be skipped and not used for installation. - Install and Verify: For each tool defined in the JSON files, the script runs the installation command and then verifies the installation using the verification command.
- Installs a list of predefined tools defined in tools.json.
- Sample json
{ "name": "go", "install_command": "brew install go", "verify_command": "go version" } - Checks the installation status of each tool using the verify_command.
- Displays a formatted table with the status of each tool given in tools.json.
- Prompts the user to install all non-available binaries.
- New Feature: A JSON file placed in
$HOME/.macsetupin the following format can be used to install and verify tools:{ "name": "ghostty", "install_command": "brew install ghostty", "verify_command": "ghostty --version", "notes": "Ghostty is a terminal emulator" } - Default Tools:The default tools.json file is located in config/tools.json.
- Sample Configurations: Sample JSON configuration files are available in the samples directory and can be added to the ~/.macsetup directory for custom tool installations.
name: The name of the tool.install_command: The command to install the tool.verify_command: The command to verify the installation of the tool.notes: A description of what the tool does.skip: If set totrue, skips both installation and verification of the tool.post_installation: An optional command to run after installation and before verification.- Distribution Based: The script now supports multiple JSON files, making it more distribution-based. You can use and distribute different JSON files to check and validate installations.
curl -sSL https://raw.githubusercontent.com/bhanurp/macsetup/main/macsetup.sh | bash -s -- --status --installTo check the installation status of all predefined tools and applications, use the --status flag:
./macsetup.sh --status/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"brew install zsh
brew install oh-my-zsh
brew install powerlevel10k
echo "source $(brew --prefix)/share/powerlevel10k/powerlevel10k.zsh-theme" >>~/.zshrc
p10k configurebrew install git
brew install --cask iterm2
brew install python
brew install go
brew install openjdk@17
brew install --cask visual-studio-code
brew install --cask slack
brew install --cask postman
brew install jq
brew install --cask docker
brew install --cask rancher
brew install gh
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
export NVM_DIR="$HOME/.nvm"
nvm install stable
brew install httpie
brew install k9s
brew install aws
brew install --cask sdm
brew install jfrog-cli
brew install kubectl
brew install fzf
brew install tree
brew install git-lfsbrew install --cask arc
brew install --cask brave-browserbrew install rectangle
brew install speedtest-cli
brew install bat
brew install clipper- Use
Shift+Command+5to open the screenshot tool. - Click on "Options". Then click "Other Location...".
- Select that specific location that you created earlier.
Show hidden files
defaults write com.apple.finder AppleShowAllFiles -bool true
killall Finderdefaults write com.apple.dock autohide-delay -float 0
defaults write com.apple.dock autohide-time-modifier -float 0.5
killall Dockexport EDITOR=vim
export VISUAL=vimdefaults write com.apple.finder _FXShowPosixPathInTitle -bool true
killall Findergit config --global user.name "Your Name"
git config --global user.email "your.email@example.com"
git config --global core.editor vimbrew install spotifyThe following table lists all the binaries that are installed via the default tools.json in
tools.json
:
The repository includes a GitHub Actions workflow to validate the installation of tools. The workflow checks if tools.json exists, installs the necessary tools, and validates their installation.

