Inspired by Thoughtbot/Laptop
Automate your macOS development environment setup with a single script. Machine installs Homebrew packages, configures system settings, and sets up essential development tools.
This script will:
- Install Homebrew and packages from
Brewfile - Set Fish shell as your default shell
- Configure macOS settings (tap to click, Caps Lock to Escape, etc.)
- Install App Store applications
- Set up Go workspace directories
- Install Deno runtime
Before running the script:
-
Install Xcode Command Line Tools (required for Homebrew):
sudo softwareupdate -i -a xcode-select --install
-
Install Git (required to clone this repository):
- Git should be available after installing Xcode Command Line Tools
- Verify with:
git --version
-
Clone the repository:
git clone https://github.com/phantompunk/machine.git cd machine -
Review the script (recommended):
less machine less Brewfile
Warning: This script will make system-level changes. Review and customize
Brewfileand themachinescript before running. -
Run the script:
sh machine 2>&1 | tee ~/machine.log
-
Review the installation log (optional):
less ~/machine.log
- Fish Shell - User-friendly shell with autosuggestions (set as default)
- Homebrew - Package manager for macOS
- bat - Modern
catwith syntax highlighting - eza - Modern
lsreplacement - fzf - Fuzzy finder
- ripgrep - Fast recursive search
- fd - Fast
findalternative - zoxide - Smarter
cdcommand - tldr - Simplified man pages
- Neovim - Modern Vim-based text editor
- Git - Version control
- diff-so-fancy - Better git diffs
- pre-commit - Git hook framework
- entr - Run commands when files change
- Node.js - JavaScript runtime
- Go - Go programming language
- Python 3.10 - Python runtime
- Pyenv - Python version manager
- Rust - Rust programming language
- Deno - Modern JavaScript/TypeScript runtime
- pipx - Install Python applications in isolation
- python-tabulate - Pretty-print tabular data
- golang-migrate - Database migrations
- golangci-lint - Go linter aggregator
- jq - JSON processor
- yq - YAML processor
- ffmpeg - Video/audio processing
- ImageMagick - Image processing
- jpegoptim - JPEG optimization
- tesseract - OCR engine
- Colima - Container runtime (Docker Desktop alternative)
- Docker - Container management
- docker-compose - Multi-container applications
- kubernetes-cli - Kubernetes management (kubectl)
- k9s - Terminal UI for Kubernetes
- helm - Kubernetes package manager
- kind - Kubernetes in Docker
- minikube - Local Kubernetes
- kubectx - Context/namespace switcher
- kubeseal - Encrypted Kubernetes secrets
- eksctl - AWS EKS management
- Terraform - Infrastructure as Code
- FluxCD - GitOps for Kubernetes
- Buildkit - Concurrent build toolkit
- PostgreSQL 15 Client - PostgreSQL client tools
- MySQL Client - MySQL client tools
- sqlc - Generate type-safe code from SQL
- Hugo - Static site generator
- wget - Network downloader
- mas - Mac App Store CLI
- shellcheck - Shell script linter
- vegeta - HTTP load testing
- vhs - Terminal recording
- mods - AI for the command line
- Tailscale - VPN mesh networking
- exercism - Coding practice platform CLI
- tdl - Three Dots Labs CLI
- 1Password - Password manager
- Brave Browser - Privacy-focused web browser
- Kitty - GPU-accelerated terminal
- Obsidian - Knowledge base and note-taking
- Typora - Markdown editor
- Google Drive - Cloud storage sync
- Rocket - Emoji picker
- noTunes - Prevent iTunes/Music from launching
- Spotify - Music streaming
- Bruno - API client
- ngrok - Secure tunnels to localhost
- Fira Code Nerd Font - Developer font with ligatures
- Amphetamine - Keep your Mac awake
- Flow - Pomodoro timer
- NordVPN - VPN client
- Color Picker - Color selection tool
- Enable tap to click on trackpad
- Enable secondary click on mouse
- Remap Caps Lock to Escape
- Disable special characters on key press and hold
Edit Brewfile to add or remove packages:
# Add a brew formula
brew "package-name"
# Add a cask application
cask "app-name"
# Add a Mac App Store app
mas "App Name", id: 123456789Edit the machine script to change macOS configuration (lines 79-89).
After running the script:
-
Configure Fish shell:
# Add Homebrew to Fish path fish_add_path /opt/homebrew/bin -
Set up SSH key (for GitHub):
- Follow GitHub's SSH key guide
-
Set up GPG key (for signed commits):
- Follow GitHub's GPG key guide
-
Restart your terminal or open a new tab to use Fish shell
- Ensure Xcode Command Line Tools are installed:
xcode-select --print-path - Check for errors in
~/machine.log
- Manually add Fish to
/etc/shells:echo $(which fish) | sudo tee -a /etc/shells - Change shell:
chsh -s $(which fish)
- Ensure you're signed into the Mac App Store
- Run
mas signin your@email.combefore running the script
- Some operations require admin privileges
- The script will prompt for your password when needed