This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
MacSetup is a comprehensive macOS automation tool for quickly configuring new Macs with software installations and system optimizations. The project features a modular shell script architecture with extensive logging, configuration management, and user-friendly interfaces.
./init.sh # Interactive wizard (recommended)
./init.sh --help # Show comprehensive help
./init.sh --list-profiles # List available configuration profiles./init.sh --profile developer # Developer environment setup
./init.sh --profile designer # Designer tools and applications
./init.sh --profile basic # Basic office setup
./init.sh --config custom.conf # Use custom configuration file./init.sh --packages-only # Install software packages only
./init.sh --config-only # Apply system configurations only
./init.sh --dry-run # Preview mode (no actual installation)
./init.sh --verbose # Detailed output with debug info
./init.sh --yes # Skip all confirmation prompts./init.sh --remote list # List community configurations
./init.sh --remote use URL # Use configuration from URL
./init.sh --remote install NAME # Install community configurationscripts/core/utils.sh- System utilities and helper functionsscripts/core/logger.sh- Advanced logging system with multiple levelsscripts/core/config.sh- Configuration management and profile loadingscripts/core/remote-config.sh- Remote configuration handlingscripts/installers/homebrew.sh- Homebrew package managementscripts/configurers/system.sh- macOS system settings configuration
configs/packages/- Software package lists (homebrew.txt, cask.txt, appstore.txt)configs/profiles/- Pre-defined configuration profiles (basic.conf, developer.conf, designer.conf)configs/system/- System configuration scripts (defaults.sh)configs/dotfiles/- Configuration file templates
Each major function is separated into its own module with consistent error handling and logging. Core utilities provide shared functionality across modules.
All behavior is controlled through configuration files. Command-line arguments override configuration settings. Supports conditional configurations based on system properties.
- Dry-run mode for previewing operations
- Automatic backup creation before system modifications
- Graceful failure handling with detailed error reporting
- User confirmation for potentially destructive operations
Multi-level logging (DEBUG, INFO, WARN, ERROR, FATAL) with file and console output, automatic log rotation, and built-in error analysis.
git # Version control system
node # Node.js runtime
docker # Container platformPACKAGES_FILE="dev-packages.txt"
CASKS_FILE="dev-apps.txt"
INSTALL_HOMEBREW="true"
CONFIGURE_SYSTEM="true"
DEVELOPER_MODE="true"497799835:Xcode # Apple development toolsWhen modifying this codebase:
- Test changes with
--dry-runmode first - Use the logging system for debugging (
log_debug,log_info, etc.) - Follow the modular pattern - add new features as separate modules
- Update configuration files rather than hardcoding values
- Ensure all operations support backup and recovery
- Test on both Intel and Apple Silicon Macs when possible
- macOS 10.15 (Catalina) or later
- At least 5GB available disk space
- Administrator account privileges
- Stable internet connection