Laptop is a script to set up a macOS laptop for web development.
It can be run multiple times safely on the same machine. It installs and upgrades packages based on what is already installed.
- macOS Sonoma (14.x) on Apple Silicon and Intel
Download the script:
curl --remote-name https://raw.githubusercontent.com/1000bulbs/laptop/master/mac
Run the script:
sh mac 2>&1 | tee ~/laptop.log
Optionally, review the log:
less ~/laptop.log
mysql-client@5.7
is now expired in homebrew, so we will need to install it manually.
Tap homebrew-core
brew tap homebrew/core --force
Edit the mysql-client@5.7
formula
brew edit mysql-client@5.7
Remove the line that begins with
disable! date:
Edit openssl@1.1
formmula
openssl@1.1
is now unsupported, so we need to edit its installation file
brew edit openssl@1.1
Remove the following line
disable! date: "2024-10-24", because: :unsupported
Install mysql-client@5.7
HOMEBREW_NO_INSTALL_FROM_API=1 brew install mysql-client@5.7
Link mysql binaries
brew link --force mysql-client@5.7
Your last laptop run will be saved to ~/laptop.log
. Read through it and see if
you can find the issue. If not, open a new GitHub
Issue and attach the log file
as an attachment.
macOS tools:
- Homebrew for managing operating system libraries.
Unix tools:
- Git for version control
- OpenSSL for Transport Layer Security (TLS)
- RCM for managing company and personal dotfiles
- The Silver Searcher for finding things in files
- Tmux for saving project state and switching between projects
- Zsh as your shell
GitHub tools:
- GitHub CLI for interacting with the GitHub API
Image tools:
- ImageMagick for cropping and resizing images
Programming languages, package managers, and configuration:
- asdf-vm for managing programming language versions
- Bundler for managing Ruby libraries
- Node.js and npm, for running apps and installing JavaScript packages
- Ruby stable for writing general-purpose code
- Yarn for managing JavaScript packages
- Rosetta 2 for running tools that are not supported in Apple silicon processors
Databases:
You can add your own customizations by adding them to your ~/.laptop.local
file, which is run at the end of the laptop script.
Put your customizations there. For example:
#!/bin/sh
brew bundle --file=- <<EOF
brew "go"
EOF
fancy_echo "Cleaning up old Homebrew packages ..."
brew cleanup
Make sure your customizations can be run safely more than once.
See the mac
script for examples.
Follow shell style guidelines by using ShellCheck.
brew install shellcheck
Test laptop script
shellcheck mac
Test customizations script
shellcheck ~/.laptop.local