Skip to content

itxDeeni/mac-dev-setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ macbook-setup

Automated macOS setup script for software engineers and DevOps professionals

macOS License: MIT Shell

A comprehensive, idempotent setup script that configures your Mac for modern software development. Supports both Intel and Apple Silicon Macs with automatic architecture detection.

✨ Features

  • πŸ” Auto-detects architecture (Intel x86_64 vs Apple Silicon arm64)
  • πŸ”„ Idempotent β€” safe to run multiple times
  • πŸ“ Comprehensive logging β€” saves output to timestamped log files
  • βš™οΈ Customizable β€” CLI flags to skip components
  • 🎯 Minimal mode β€” install only essentials
  • πŸ›‘οΈ Safe β€” backs up configs before modifying

πŸ“‹ What Gets Installed

Essential Development Tools

  • Homebrew β€” Package manager
  • Git with SSH key generation
  • Modern CLI tools β€” bat, eza, fd, ripgrep, fzf, jq, yq, htop, tree
  • Starship β€” Modern shell prompt
  • tmux β€” Terminal multiplexer

Programming Languages

  • Python (3.11 & 3.12) with pip, virtualenv, pipenv, poetry
  • Node.js via nvm (version manager)
  • Go β€” Latest stable
  • Rust via rustup
  • Java (OpenJDK 17)

Cloud & DevOps Tools

  • Docker β€” Container platform
  • Kubernetes β€” kubectl, kubectx, k9s, helm
  • Terraform β€” Infrastructure as Code
  • AWS CLI β€” Amazon Web Services
  • Google Cloud SDK β€” Google Cloud Platform
  • Azure CLI β€” Microsoft Azure
  • Ansible β€” Configuration management
  • HashiCorp Tools β€” packer, vault, consul, nomad, vagrant

Databases

  • PostgreSQL 15
  • MySQL
  • Redis
  • MongoDB

IDEs & Editors

  • Visual Studio Code
  • Neovim
  • JetBrains Toolbox

Productivity Tools

  • iTerm2 β€” Better terminal
  • Slack β€” Team communication
  • Zoom β€” Video conferencing
  • Notion β€” Note-taking
  • Rectangle β€” Window management
  • Postman β€” API testing

Shell Configuration

  • Oh My Zsh β€” Zsh framework
  • Plugins β€” autosuggestions, syntax highlighting
  • Aliases β€” Convenient shortcuts

πŸš€ Quick Start

One-Line Install

bash <(curl -fsSL https://raw.githubusercontent.com/YOUR_USERNAME/macbook-setup/main/setup.sh)

Manual Install

# Clone the repository
git clone https://github.com/YOUR_USERNAME/macbook-setup.git
cd macbook-setup

# Make executable
chmod +x setup.sh

# Run the script
./setup.sh

βš™οΈ Usage Options

./setup.sh [OPTIONS]

Options:
  --skip-cloud       Skip cloud provider tools (AWS, GCP, Azure)
  --skip-databases   Skip database installations
  --minimal          Install only essential tools
  --help             Show help message

Examples

# Full installation
./setup.sh

# Minimal installation (essentials only)
./setup.sh --minimal

# Skip cloud tools
./setup.sh --skip-cloud

# Skip databases (use Docker containers instead)
./setup.sh --skip-databases

# Combine flags
./setup.sh --skip-cloud --skip-databases

πŸ—οΈ Architecture Support

Architecture Status Homebrew Path
Apple Silicon (M1/M2/M3) βœ… Supported /opt/homebrew
Intel (x86_64) βœ… Supported /usr/local

The script automatically detects your Mac's architecture and configures tools accordingly.

πŸ“¦ Post-Installation

After the script completes:

  1. Restart your terminal or run:

    source ~/.zshrc
  2. Open Docker.app to complete Docker setup

  3. Add SSH key to Git providers:

    cat ~/.ssh/id_ed25519.pub

    Copy and add to GitHub / GitLab

  4. Configure cloud providers:

    # AWS
    aws configure
    
    # Google Cloud
    gcloud init
    
    # Azure
    az login
  5. Install VS Code extensions (recommended):

    • Python
    • Docker
    • Kubernetes
    • Terraform
    • GitLens
    • Remote - SSH
    • ESLint
    • Prettier
  6. Restart your Mac for all system changes to take effect

πŸ“ Directory Structure

The script creates:

~/Development/
β”œβ”€β”€ projects/     # Your coding projects
β”œβ”€β”€ learning/     # Learning materials
β”œβ”€β”€ tools/        # Custom tools
└── scripts/      # Automation scripts

πŸ”§ Customization

Edit setup.sh to:

  • Add/remove tools
  • Modify shell configuration
  • Change directory structure
  • Adjust performance settings

See CONTRIBUTING.md for guidelines.

πŸ› Troubleshooting

Xcode Command Line Tools

If the script exits asking for Xcode tools:

  1. Complete the installation popup
  2. Re-run the script

Homebrew Issues

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Docker Not Starting

  1. Open Docker.app manually
  2. Grant necessary permissions
  3. Wait for Docker to fully start

NVM Not Found

The script adds NVM to .zshrc. If issues persist:

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"

πŸ’‘ Performance Tips

For Older Macs (2015-2019)

  • Use --skip-databases and run DBs in Docker
  • Limit Docker resources (Settings β†’ Resources)
  • Close unused applications
  • Keep 10-15% free disk space

For All Macs

  • Disable unused services: brew services list
  • Stop databases when not needed: brew services stop <service>
  • Use lightweight terminal tools over GUI apps

πŸ”’ Security Recommendations

  1. Enable FileVault β€” Full disk encryption
  2. Use strong passwords β€” For all accounts
  3. Enable Firewall β€” System Settings β†’ Network β†’ Firewall
  4. Keep software updated β€” brew upgrade
  5. Use 2FA β€” Enable on all cloud accounts

πŸ“š Resources

🀝 Contributing

Contributions are welcome! See CONTRIBUTING.md for guidelines.

πŸ“ License

MIT License β€” Free to use and modify.

⭐ Show Your Support

If this script helped you, give it a ⭐️!


Made with ❀️ for the developer community

About

Automated macOS development environment setup with timeout protection and smart dependency detection for Intel & Apple Silicon Macs

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages