Skip to content

A shell script to set up a macOS laptop development

License

Notifications You must be signed in to change notification settings

cjsimm/bash-macos-setup

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MacOS Setup

A fork of Thoughtbot's laptop script, personalized for different development goals.

It can be run multiple times on the same machine safely. It installs, upgrades, or skips packages based on what is already installed on the machine.

Requirements

Support:

  • macOS Ventura (13.x) on Apple Silicon and Intel
  • macOS Monterey (12.x) on Apple Silicon and Intel

Older versions may work but aren't regularly tested. Bug reports for older versions are welcome.

Install

Download the script:

curl --remote-name https://raw.githubusercontent.com/thoughtbot/laptop/main/mac

Review the script (avoid running scripts you haven't read!):

less mac

Execute the downloaded script:

sh mac 2>&1 | tee ~/laptop.log

Optionally, review the log:

less ~/laptop.log

Debugging

Your last run will be saved to ~/laptop.log. Read through it to see if you can debug the issue yourself.

What it sets up

macOS tools:

  • Homebrew for managing operating system libraries.

Dev tools:

  • Universal Ctags for indexing files for vim tab completion
  • Git for version control
  • OpenSSL for Transport Layer Security (TLS)
  • The Silver Searcher for finding things in files
  • Tmux for saving project state and switching between projects
  • Zsh as your shell
  • neovim for terminal textx-editing/general development
  • openssh for secure shell protocol
  • wget for file download and easier syntax than curl
  • htop as a loightweight terminal based task manager
  • gcc as an alternative compiler to clang. Can be invoked with appending '-' plus the version number. Calling just 'gcc' on MacOS will use the clang compiler by default.
  • wireshark: for packet analysis
  • ngrok for easy tunnelling from localhost
  • raspberry-pi-imager for flashing sd cards and installing pi images

Browsing:

  • Firefox for general browsing
  • Brave for a (mostly) degoogled Chromium browser

GitHub tools:

Image tools:

Programming languages, package managers, and configuration:

  • asdf-vm for managing programming language versions
  • Node.js and npm, for running apps and installing JavaScript packages
  • Yarn for managing JavaScript packages
  • Rosetta 2 for running tools that are not supported in Apple silicon processors

Databases:

  • Postgres for storing relational data
  • Redis for storing key-value data

It should take less than 15 minutes to install (depends on your machine).

Testing your changes

Test your changes by running the script on a fresh install of macOS. You can use the free and open source emulator UTM.

Tip: Make a fresh virtual machine with the installation of macOS completed and your user created and first launch complete. Then duplicate that machine to test the script each time on a fresh install thats ready to go.

License

Laptop is © 2011-2022 thoughtbot, inc. It is free software, and may be redistributed under the terms specified in the LICENSE file.

About

A shell script to set up a macOS laptop development

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%