How I Setup a New Development Machine - Using Scripts to Automate Installs and Save Time
Based on Corey Schafer's video on YouTube. If you like this content, support the original creators by watching, liking and subscribing to their content.
Install Homebrew first so the rest of the setup can rely on repeatable package commands from the command line.
Briefing
A new MacBook can be turned into a fully working development environment in under 10 minutes by combining Homebrew with a personal “dotfiles” repository and install scripts that automate both software installs and terminal/editor preferences. The core idea is simple: instead of rebuilding the same setup from scratch every time, the machine’s configuration—terminal look, shell aliases, developer tools, and key apps—gets recreated from a repeatable script so the process is fast and consistent.
After the out-of-the-box Mac setup (user creation and Wi‑Fi), the workflow starts with two quick quality-of-life tweaks in Terminal: switching to a dark profile, increasing the font size to 30, and adjusting anti-aliasing and background transparency for readability. Then Homebrew is installed via the official Ruby command pulled from Homebrew’s website and run in Terminal. The script assumes administrator access (the creator is the sole user on the laptop), and it notes that non-admin users would need to run the install with appropriate permissions.
With Homebrew in place, the setup pivots to automation. Git is checked first (running `git` to confirm it’s available), and then the creator clones a GitHub repository named `dotfiles` into the home directory. That repository contains bash scripts and configuration files that drive the rest of the setup. The main entry point is `install.sh`, which takes the home directory as an argument. Inside, it creates symlinks from the repository’s dotfiles (such as `bash_profile`, `bashrc`, prompt configuration, and aliases) into the user’s home directory, overwriting older versions. It also downloads Git auto-completion and runs additional installation steps for command-line tooling and Sublime Text preferences.
Software installation is handled by a Homebrew-based script (`brutus.sh`). It installs command-line essentials like Python 3 (since a fresh Mac typically lacks Python 3), plus utilities such as `tree`. It also uses Homebrew Cask to install a broad set of desktop apps: Google Chrome, Firefox, Sublime Text, VirtualBox, SourceTree, Spotify, Discord, Google Drive backup and sync, Skype, VLC, and several other utilities including Divi and Hyper-related apps. The script also installs the Source Code Pro font.
Sublime Text is configured through `sublime.sh`, which pulls Package Control and copies custom settings, build systems, and shortcuts into Sublime’s expected locations under the user’s home directory. A command-line convenience symlink is created so Sublime can be launched via `subl` (e.g., `subl .dotfiles`). After running the combined `install.sh`, the creator verifies the results: Terminal styling updates correctly, Source Code Pro appears in font preferences, installed apps are present, `python3` works, and `tree` renders the directory structure.
The automation isn’t perfect. Sublime’s “installed packages” behavior didn’t fully apply on the first run, leading to missing theme/package errors until packages were installed manually. Even so, the overall payoff remains large: what used to take an entire day manually now takes only minutes for the heavy lifting, while smaller tasks—signing into accounts, rearranging the Dock, and setting a background—are left for manual completion. The scripts are continuously improved and uploaded so future setups get even smoother.
Cornell Notes
The setup uses Homebrew plus a GitHub-hosted “dotfiles” repository to recreate a preferred development environment quickly and consistently. A main `install.sh` script symlinks shell configuration files (prompt, aliases, bash profiles), downloads Git auto-completion, installs command-line tools (including Python 3 and `tree`), and uses Homebrew Cask to install desktop apps like Chrome, Firefox, Sublime Text, VirtualBox, SourceTree, Spotify, Discord, and Google Drive backup and sync. A separate `sublime.sh` script installs Package Control and copies custom Sublime settings, build systems, and shortcuts, plus creates a `subl` command for launching Sublime from the terminal. After running the scripts, the machine is verified via Terminal appearance, font installation (Source Code Pro), and working commands like `python3` and `tree`—with some Sublime package installation requiring manual follow-up.
How does the setup avoid reconfiguring Terminal and shell preferences from scratch each time?
Why is Homebrew the first major automation step, and what does it enable?
What’s inside the automation for software installation, and how is it split between command-line and GUI apps?
How does the Sublime Text configuration get automated, and what is the role of Package Control?
What verification steps confirm the automation worked, and what issues still required manual fixes?
Review Questions
- If you wanted to add a new command-line tool to this workflow, which script section would you modify and why?
- What is the purpose of symlinking dotfiles into the home directory, and how does it affect repeatability across machines?
- Why might Sublime Text package installation still require manual steps even when settings are copied automatically?
Key Points
- 1
Install Homebrew first so the rest of the setup can rely on repeatable package commands from the command line.
- 2
Store terminal and editor preferences as version-controlled dotfiles in a GitHub repository and recreate them via symlinks on new machines.
- 3
Use a single entry script (`install.sh`) that accepts the home directory argument and orchestrates symlinks, auto-completion, and app/tool installation.
- 4
Split installation logic: use `brew install` for command-line tools and `brew cask install` for GUI apps and fonts.
- 5
Automate Sublime Text setup by copying Package Control, settings, build systems, and shortcuts into Sublime’s expected directories and creating a `subl` command for terminal launching.
- 6
Expect to validate after automation: confirm fonts, key commands (like `python3` and `tree`), and installed apps are actually present.
- 7
Leave account sign-ins and small UI personalization (Dock layout, background) for manual steps to avoid brittle automation.