This project provides an automated setup for a macOS development environment using Ansible. It configures your macOS system with essential development tools, terminal customizations, and best practices configurations.
-
📦 Package Management
- Homebrew installation and configuration
- Essential development tools and utilities
- Programming languages and frameworks
-
🔧 Shell Configuration
- ZSH setup with Oh-My-Zsh
- Powerlevel10k theme
- Useful plugins and customizations
- Enhanced command-line productivity tools
-
🛠 Development Tools
- Git and GitHub CLI configuration
- VS Code setup
- iTerm2 with custom preferences
- Kubernetes tools
- Infrastructure tools (Terraform, etc.)
-
⚙️ System Preferences
- Custom macOS preferences
- Development-friendly defaults
- Enhanced security settings
- macOS (tested on Sonoma 14.0+)
- Administrator access
- Internet connection
-
Clone this repository:
git clone https://github.com/yourusername/setup-macos.git cd setup-macos -
Make the setup script executable:
chmod +x setup.sh
-
Run the setup script:
./setup.sh
-
Follow the prompts to configure Git and other personal preferences.
The script will execute the following playbooks in order:
01-homebrew.yml: Installs Homebrew and essential tools02-shell.yml: Configures ZSH with Oh-My-Zsh and customizations03-git.yml: Sets up Git and GitHub CLI04-languages.yml: Installs and configures programming languages
For testing or development without a macOS machine, we provide a Docker-based test environment:
-
Ensure Docker is installed on your system
-
Make the test script executable:
chmod +x test/test-environment.sh
-
Run the test environment:
./test/test-environment.sh
The test environment simulates a macOS environment but has some limitations. See test/test-environment.sh for a detailed list of what works and what doesn't.
.
├── setup.sh # Main setup script
├── playbooks/ # Ansible playbooks directory
│ ├── 01-homebrew.yml # Homebrew packages and apps installation
│ ├── 02-shell.yml # ZSH configuration and customization
│ ├── 03-git.yml # Git and GitHub CLI configuration
│ └── 04-languages.yml # Programming languages setup (Erlang, Elixir, Ruby, Node.js, Go)
├── test/ # Test environment directory
│ ├── Dockerfile # Test environment definition
│ ├── .dockerignore # Docker ignore file
│ └── test-environment.sh # Test environment script
└── README.md # Project documentation
Edit playbooks/01-homebrew.yml and add packages under the appropriate section:
- name: Install Development Tools
homebrew:
name:
- your-package-name
state: presentEdit playbooks/02-shell.yml to customize:
- Plugins
- Theme settings
- Shell aliases
- Environment variables
Edit playbooks/03-git.yml to modify:
- Git aliases
- Default settings
- GitHub CLI configuration
Edit playbooks/04-languages.yml to:
- Add/remove programming languages
- Change versions
- Add global tools
- Modify language-specific settings
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
- Some features may not work on Apple Silicon Macs without Rosetta 2
- Certain system preferences may require manual intervention
- Test environment cannot fully simulate macOS-specific features
This project is licensed under the MIT License - see the LICENSE file for details.
- Ansible
- Homebrew
- Oh-My-Zsh
- Powerlevel10k
- All the amazing open-source tools included in this setup
If you encounter any issues or have questions:
- Check the Known Issues section
- Open an issue in the repository
- Provide detailed information about your system and the problem