This script automates the setup of a fresh macOS system with development tools, applications, and system configurations.
Before running this script, please:
- Download and review the script instead of running directly from the internet
- Understand what it does before executing
- Never run as root/sudo
# Download the script
curl -O https://your-domain.com/initialise_mac.sh
# Review the script content
less initialise_mac.sh
# Make it executable
chmod +x initialise_mac.sh
# Run the script
./initialise_mac.sh
curl -fsSL https://your-domain.com/initialise_mac.sh | bash
Warning: The direct method bypasses script review and can be dangerous. Always prefer the safe method above.
- Installs and configures Homebrew
- Configures tap:
- Essential CLI tools:
- git
- node
- zsh (with completions and syntax highlighting)
- mas (Mac App Store CLI)
- gh (GitHub CLI)
- gnupg
- pinentry-mac
- Visual Studio Code
- Ghostty (terminal emulator)
- Readdle Spark (email client)
- Google Chrome
TBD
- Shows hidden files in Finder
- Sets optimal key repeat rates
- Configures Finder preferences
- Disables boot sound
- Shows file extensions globally
- Enables Finder status and path bars
- Configures GPG for secure commit signing
- Sets up pinentry-mac for password prompts
- Configures GPG agent with sensible cache timeouts
- Adds necessary environment variables to shell
After the script completes, you can set up your GPG key:
# Generate a new GPG key
gpg --full-generate-key
# Use RSA and RSA, 4096 bits, and your GitHub email
# List your key ID
gpg --list-secret-keys --keyid-format=long
# Configure Git
git config --global user.signingkey YOUR_KEY_ID
git config --global commit.gpgsign true
# Export your public key for GitHub
gpg --armor --export YOUR_KEY_ID
Add to GitHub:
- Copy the exported GPG key
- Go to GitHub Settings → SSH and GPG keys
- Click "New GPG key"
- Paste your public key
The script configures Zsh with syntax highlighting. You may want to:
- Choose a different theme
- Add additional plugins
- Customize your prompt
- Designed for macOS with Apple Silicon
- Compatible with Intel Macs (automatically detects architecture)
- Some changes require a system restart to take effect
- The script is idempotent (safe to run multiple times)
- Requires admin privileges for some operations (will prompt for sudo password)
Feel free to fork and modify this script for your needs. If you make improvements, please consider submitting a pull request.