A comprehensive macOS development environment setup script with beautiful logging and automatic configuration backup.
Note: This is just me geeking out and automating my entire dev setup because I got tired of manually configuring everything every time I set up a new machine. Feel free to fork it and make it your own! 🤓
- 🎨 Beautiful colored logging with emojis and status indicators
- 🛡️ Automatic config backup before overwriting existing files
- 🔐 Complete SSH & GPG setup for GitHub authentication
- 📦 Essential development tools installation via Homebrew
- ⚙️ Git configuration with professional defaults
- 🎯 GUI applications for productivity and development
- 👤 User-agnostic - works for any macOS user automatically
- git - Version control system
- gh - GitHub CLI
- nano - Text editor
- fnm - Fast Node Manager
- jq - JSON processor
- tree - Directory structure visualization
- htop - Interactive process viewer
- wget & curl - Download utilities
- pinentry-mac - GPG passphrase entry for macOS
- Rectangle - Window management
- Postman - API testing
- Docker - Containerization platform
- Visual Studio Code - Code editor
- Spotify - Music streaming
- Menlo for Powerline - Enhanced terminal font
- Oh My Zsh with zsh-autosuggestions plugin
- Powerlevel10k theme configuration
- SSH key generation and GitHub integration
- GPG key setup with commit signing
- Git configuration with professional defaults
-
Clone the repository:
git clone https://github.com/your-username/dev-config.git cd dev-config -
Make the script executable:
chmod +x preconfigure.sh
-
Run the setup:
./preconfigure.sh
-
Follow the prompts for Git username/email and GitHub authentication
| File | Description |
|---|---|
.aliases |
Custom shell aliases for Git shortcuts |
.zshrc |
Zsh configuration with plugins and PATH setup |
.p10k.zsh |
Powerlevel10k theme configuration |
.nano/ |
Nano syntax highlighting files |
WindowProfile.json |
iTerm2 window profile configuration (not used by script) |
teka- Quick commit with 'WIP' message ("teka" means "wait" in Tagalog - useful when quickly switching branches)game- Soft reset to previous commit (Filipino slang for "okay, I'm ready to get back to it")pahabol- Amend last commit without editing message ("pahabol" means "to catch up" in Tagalog)gpr- Checkout GitHub pull requesta- Edit and reload aliases
Note: The first three aliases reflect Filipino expressions that capture common Git workflows in a culturally meaningful way.
The script sets up Git with these professional defaults:
[core]
autocrlf = false
excludesfile = ~/.gitignore
eol = lf
ignorecase = false
editor = nano
[pull]
ff = only
[push]
autoSetupRemote = true
[commit]
gpgsign = true- SSH key generation with ed25519 encryption
- GPG key setup for commit signing
- Automatic key addition to GitHub
- Secure passphrase handling with pinentry-mac
- Config file backup before modifications
- macOS (Apple Silicon or Intel)
- Homebrew installed (install here)
- Oh My Zsh installed (install here)
After running the script:
- Restart your terminal to apply Zsh changes
- Configure Powerlevel10k by running
p10k configure - Verify GitHub authentication with
gh auth status - Test Git signing with a commit
The script automatically backs up existing configuration files to:
~/.config-backup-YYYYMMDD-HHMMSS/
To restore previous configs:
cp ~/.config-backup-*/filename ~/.filename🚀 [STEP] Installing CLI tools...
ℹ️ [INFO] Installing git...
✅ [SUCCESS] git installed successfully
ℹ️ [INFO] Installing gh...
✅ [SUCCESS] gh installed successfully
🚀 [STEP] Setting up GitHub CLI...
ℹ️ [INFO] Starting GitHub CLI authentication...
✅ [SUCCESS] GitHub CLI authenticated successfully
🚀 [STEP] Configuring Git...
ℹ️ [INFO] Setting up Git configuration...
✅ [SUCCESS] Git configured with comprehensive settings
- Fork the repository
- Create a feature branch
- Make your changes
- Test the setup script
- Submit a pull request
This project is open source and available under the MIT License.
- Homebrew for package management
- Oh My Zsh for Zsh framework
- Powerlevel10k for the beautiful prompt
- GitHub CLI for seamless Git integration
Made with ❤️ for developers who love beautiful, automated setups