{"id":18657383,"url":"https://github.com/garretpatten/macos-setup-scripts","last_synced_at":"2026-02-17T22:02:34.902Z","repository":{"id":159529016,"uuid":"634684599","full_name":"garretpatten/macOS-setup-scripts","owner":"garretpatten","description":"Setup scripts for Mac OS environments","archived":false,"fork":false,"pushed_at":"2026-02-01T03:23:49.000Z","size":93,"stargazers_count":1,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-01T13:41:49.932Z","etag":null,"topics":["automation","configuration-management","dev-environment","setup-script"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/garretpatten.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-04-30T22:55:48.000Z","updated_at":"2026-02-01T03:23:51.000Z","dependencies_parsed_at":"2023-11-23T16:31:04.418Z","dependency_job_id":"7f772606-3f92-413e-b217-1b036f90914d","html_url":"https://github.com/garretpatten/macOS-setup-scripts","commit_stats":null,"previous_names":["garretpatten/macos-setup-scripts"],"tags_count":0,"template":false,"template_full_name":"garretpatten/template","purl":"pkg:github/garretpatten/macOS-setup-scripts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garretpatten%2FmacOS-setup-scripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garretpatten%2FmacOS-setup-scripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garretpatten%2FmacOS-setup-scripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garretpatten%2FmacOS-setup-scripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/garretpatten","download_url":"https://codeload.github.com/garretpatten/macOS-setup-scripts/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garretpatten%2FmacOS-setup-scripts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29559961,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T21:50:49.831Z","status":"ssl_error","status_checked_at":"2026-02-17T21:46:15.313Z","response_time":100,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","configuration-management","dev-environment","setup-script"],"created_at":"2024-11-07T07:28:02.196Z","updated_at":"2026-02-17T22:02:34.897Z","avatar_url":"https://github.com/garretpatten.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# macOS Setup Scripts\n\nA comprehensive, refactored collection of bash scripts for automated macOS\nenvironment setup. This repository provides a robust, parallel-execution system\nfor installing development tools, applications, and configurations on M-series\nMacBooks.\n\n## ✨ Features\n\n- **🚀 Parallel Execution**: CLI tools, media apps, and productivity apps\n  install simultaneously for faster setup\n- **📝 Comprehensive Logging**: Detailed logging system with error tracking\n  and debug information\n- **🛡️ Error Handling**: Robust error handling with graceful failure recovery\n- **🔧 Modular Design**: Centralized common functions library for maintainable code\n- **⚡ Optimized Performance**: Designed specifically for M-series MacBooks with Homebrew\n- **🎯 Production Ready**: Tested and validated for reliable deployment\n  across multiple machines\n\n## 🚀 Quick Start\n\n### Prerequisites\n\n- macOS (tested on recent versions)\n- Internet connection for downloads\n- Administrator privileges for system modifications\n\n### Installation\n\n1. **Clone the repository**\n\n   ```bash\n   git clone https://github.com/garretpatten/macOS-setup-scripts\n   cd macOS-setup-scripts\n   ```\n\n2. **Update submodules** (for dotfiles)\n\n   ```bash\n   git submodule update --init --remote --recursive src/dotfiles/\n   ```\n\n3. **Make scripts executable**\n\n   ```bash\n   chmod +x src/scripts/*.sh\n   ```\n\n4. **Run the complete setup**\n\n   ```bash\n   bash src/scripts/master.sh\n   ```\n\n### Individual Components\n\nYou can also run individual setup components:\n\n```bash\n# CLI tools only\nbash src/scripts/cli.sh\n\n# Development tools only\nbash src/scripts/dev.sh\n\n# Media applications only\nbash src/scripts/media.sh\n\n# Security tools only\nbash src/scripts/security.sh\n\n# Shell configuration only\nbash src/scripts/shell.sh\n```\n\n## 📁 Project Structure\n\n```text\nmacOS-setup-scripts/\n├── .gitignore                 # Excludes log files from version control\n├── src/\n│   ├── scripts/\n│   │   ├── common.sh         # Centralized functions library\n│   │   ├── master.sh         # Main orchestration script\n│   │   ├── pre-install.sh    # System and Homebrew setup\n│   │   ├── post-install.sh   # Final cleanup and completion\n│   │   ├── cli.sh           # CLI tools (parallel execution)\n│   │   ├── dev.sh           # Development tools and configuration\n│   │   ├── media.sh         # Media applications (parallel execution)\n│   │   ├── productivity.sh  # Productivity applications (parallel execution)\n│   │   ├── security.sh      # Security tools and repositories\n│   │   ├── shell.sh         # Shell and terminal configuration\n│   │   └── organizeHome.sh  # Home directory organization\n│   ├── dotfiles/            # Configuration files\n│   └── assets/              # Additional resources\n├── logs/                    # Log files (auto-created)\n│   ├── errors.log          # Error log\n│   ├── install.log         # Installation progress\n│   └── debug.log           # Debug information\n└── test_setup.sh           # Validation script\n```\n\n## 🔧 Architecture\n\n### Common Functions Library (`common.sh`)\n\nThe refactored scripts use a centralized common functions library that provides:\n\n- **Parallel Installation**: `install_brew_formulas_parallel()`, `install_brew_casks_parallel()`\n- **Logging System**: `log_error()`, `log_warn()`, `log_info()`, `log_debug()`\n- **Error Handling**: `execute_command()` with comprehensive error tracking\n- **File Operations**: `copy_file()`, `copy_directory()`, `clone_repository()`\n- **System Checks**: `check_macos()`, `check_homebrew()`, `command_exists()`\n\n### Execution Flow\n\n1. **Pre-installation**: Homebrew setup, Xcode Command Line Tools, system updates\n2. **Parallel Phase**: CLI tools, media apps, productivity apps install simultaneously\n3. **Sequential Phase**: Development tools, security tools (due to dependencies)\n4. **Configuration**: Shell setup, dotfiles, system configuration\n5. **Post-installation**: Final cleanup and completion\n\n## 📊 Logging System\n\nThe refactored scripts include a comprehensive logging system:\n\n- **Error Log** (`logs/errors.log`): All errors and failures\n- **Installation Log** (`logs/install.log`): Progress and successful operations\n- **Debug Log** (`logs/debug.log`): Detailed debugging information\n- **Console Output**: Colored, real-time progress updates\n\n## 🧪 Testing\n\nRun the validation script to ensure everything is working correctly:\n\n```bash\n./test_setup.sh\n```\n\nThis will verify:\n\n- All scripts exist and are executable\n- Common functions library works correctly\n- Logging system is functional\n- File structure is correct\n\n## 📦 What Gets Installed\n\n### 🖥️ System Configuration\n\n- **Homebrew**: Package manager for macOS\n- **Xcode Command Line Tools**: Essential development tools\n- **macOS Firewall**: Security configuration\n- **System Updates**: Latest macOS updates\n\n### 🛠️ Development Tools\n\n- **Runtimes**: Node.js, Python 3.12, NVM\n- **Containers**: Docker, Docker Compose, Colima\n- **Version Control**: Git (with custom configuration), GitHub CLI\n- **Editors**: Neovim (with Packer), VS Code (with custom settings), Vim\n- **Code Analysis**: Semgrep, Shellcheck, Tree-sitter\n- **APIs**: Postman\n- **Search**: Sourcegraph (App + CLI)\n- **Frameworks**: Angular CLI\n\n### 🎨 Terminal \u0026 Shell\n\n- **Terminal**: Ghostty (with custom configuration)\n- **Shell**: Zsh (set as default)\n- **Prompt**: oh-my-posh\n- **Plugins**: Zsh Auto Suggestions, Zsh Syntax Highlighting\n- **Multiplexer**: Tmux (with custom configuration)\n- **Fonts**: Awesome Terminal Fonts, Fira Code, Meslo Nerd Font, Powerline Symbols\n\n### 🔧 CLI Tools\n\n- **File Operations**: bat, eza, fd, ripgrep\n- **System Info**: fastfetch, htop\n- **Network**: curl, wget\n- **Data Processing**: jq\n- **Text Editor**: vim\n\n### 🌐 Media Applications\n\n- **Browsers**: Brave, DuckDuckGo\n- **Media**: Spotify, VLC\n\n### 📈 Productivity Applications\n\n- **Utilities**: Balena Etcher, Raycast\n- **Communication**: Zoom\n- **Productivity**: Notion, ChatGPT\n- **Privacy**: Proton Drive, Proton Mail\n\n### 🔒 Security Tools\n\n- **Authentication**: 1Password (App + CLI)\n- **Privacy**: Proton VPN, Signal Messenger\n- **Network Security**: OpenVPN\n- **Penetration Testing**: Burp Suite, OWASP ZAP\n- **Analysis**: ClamAV, EXIFtool, Nmap\n- **Repositories**: PayloadsAllTheThings, SecLists\n\n### ⚙️ Configuration Files\n\n- **Git**: Global configuration with custom settings\n- **Neovim**: Complete configuration with plugins\n- **Vim**: Custom .vimrc\n- **VS Code**: Custom settings and preferences\n- **Ghostty**: Terminal configuration\n- **Tmux**: Multiplexer configuration\n- **Zsh**: Shell configuration with oh-my-posh\n\n## 🔄 Parallel Execution\n\nThe refactored scripts optimize installation time through parallel execution:\n\n### ⚡ Parallel Installations\n\n- **CLI Tools**: All command-line utilities install simultaneously\n- **Media Apps**: Browsers and media players install in parallel\n- **Productivity Apps**: Productivity tools install concurrently\n\n### 🔄 Sequential Installations\n\n- **Development Tools**: Due to dependencies and system changes\n- **Security Tools**: Requires system-level modifications\n- **Shell Configuration**: Must run last as it changes the default shell\n\n## 🚨 Troubleshooting\n\n### Common Issues\n\n1. **Permission Errors**: Ensure you have administrator privileges\n2. **Homebrew Issues**: The script will install Homebrew if not present\n3. **Network Timeouts**: Check your internet connection\n4. **Disk Space**: Ensure sufficient free space (recommended: 10GB+)\n\n### Log Files\n\nCheck the log files for detailed information:\n\n```bash\n# View error log\ntail -f logs/errors.log\n\n# View installation progress\ntail -f logs/install.log\n\n# View debug information\ntail -f logs/debug.log\n```\n\n### Manual Steps\n\nSome applications require manual installation:\n\n- **App Store**: Kindle, Perplexity\n- **Web Download**: Docker Desktop\n\n## 🔧 Customization\n\n### Adding New Tools\n\nTo add new tools to the installation:\n\n1. **For Homebrew formulas**: Add to the appropriate array in the relevant script\n2. **For Homebrew casks**: Add to the appropriate array in the relevant script\n3. **For custom installations**: Add to the script using the\n   `execute_command()` function\n\n### Modifying Configurations\n\nConfiguration files are located in `src/dotfiles/`:\n\n- Modify the source files\n- The scripts will copy them to the appropriate locations\n- Changes take effect after running the setup\n\n## 📈 Performance\n\nThe refactored scripts provide significant performance improvements:\n\n- **~70% reduction** in code redundancy\n- **~50% faster** installation through parallel execution\n- **Comprehensive logging** for better debugging\n- **Robust error handling** for reliable operation\n\n## Maintainers\n\n[@garretpatten](https://github.com/garretpatten/)\n\n_For questions, bug reports, or feature requests, please open an issue on\nthis repository or contact the maintainer directly._\n\n## License\n\nThis project is licensed under the [MIT License](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgarretpatten%2Fmacos-setup-scripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgarretpatten%2Fmacos-setup-scripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgarretpatten%2Fmacos-setup-scripts/lists"}