One-command setup for a fresh macOS installation. Automatically installs and configures all essential development tools including Claude Code.
- Homebrew - Package manager for macOS
- Xcode Command Line Tools - Essential development tools
- Claude Code - AI-powered coding assistant CLI
- Git - Version control system
- Node.js & npm - JavaScript runtime and package manager
- Python 3.12 - Python programming language
- VS Code - Visual Studio Code editor
- wget & curl - Command line download tools
Run this single command in Terminal on a fresh Mac:
curl -fsSL https://raw.githubusercontent.com/petrochen/ccode-setup/main/install.sh | bash- macOS (Intel or Apple Silicon)
- Administrator password (will be requested once during installation)
- Internet connection
- Detects your system - Identifies if you're on Intel or Apple Silicon Mac
- Installs Xcode Tools - Required for development (will open a dialog)
- Installs Homebrew - The missing package manager for macOS
- Installs development tools - Git, Node.js, Python, etc.
- Installs VS Code - Popular code editor
- Installs Claude Code - AI coding assistant
- Fixes PATH - Ensures Claude Code is accessible from terminal
- Configures Git - Sets up your name and email (optional)
- Verifies everything - Checks all tools are properly installed
The script is mostly automatic, but will ask for:
- Administrator password - Once for Homebrew installation
- Xcode license agreement - Click "Agree" in the popup
- Git configuration - The script will:
- Try to auto-detect your name from macOS account
- Try to find your Apple ID email (if available)
- Suggest these values or ask you to enter them
- Allow you to change existing Git config if needed
After the script completes, run:
source ~/.zshrc # or ~/.bash_profile for bash
claude --help # Verify Claude Code worksOr simply open a new Terminal window to refresh your environment.
If you prefer to review the script first:
# Download the script
curl -fsSL https://raw.githubusercontent.com/petrochen/ccode-setup/main/install.sh -o install.sh
# Review it
cat install.sh
# Make it executable and run
chmod +x install.sh
./install.shThe script automatically adds ~/.local/bin to your PATH. If claude command still doesn't work:
# For zsh (default on modern macOS)
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
# For bash
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bash_profile
source ~/.bash_profileIf Homebrew installation fails, try manually:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"Make sure you have administrator access on your Mac. The script will request your password when needed.
If you need to change Git configuration after installation:
git config --global user.name "Your New Name"
git config --global user.email "your.new@email.com"To see current configuration:
git config --global --listYou can fork this repository and modify install.sh to:
- Add more tools (Docker, Rust, Go, etc.)
- Change Python version
- Add your preferred VS Code extensions
- Configure additional Git settings
- Install other applications via Homebrew Cask
-
Install Homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" -
Add Homebrew to PATH (Apple Silicon):
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zshrc eval "$(/opt/homebrew/bin/brew shellenv)"
-
Install tools:
brew install wget curl git node python@3.12 brew install --cask visual-studio-code
-
Install Claude Code:
curl -fsSL https://claude.ai/install.sh | bash -
Fix Claude Code PATH:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc source ~/.zshrc
Feel free to submit issues or pull requests if you have suggestions for improvements!
MIT License - Feel free to use and modify as needed.
- Homebrew team for the amazing package manager
- Anthropic for Claude Code
- All the open source tool maintainers
Note: This script is designed for fresh macOS installations. Running on a system with existing development tools will skip already installed components.