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
- macOS Sequoia (15.x) on Apple Silicon and Intel
Download the script:
curl --remote-name https://raw.githubusercontent.com/1000bulbs/laptop/master/macRun the script:
sh mac 2>&1 | tee ~/laptop.logOptionally, review the log:
less ~/laptop.logYour 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.
1000bulbs repos make extensive use of CLI tools and scripts. Many of these require access to the Docker Hub and the images we've prepared for development. To fully setup your personal workstation to work seamlessly with Docker, see the additional instructions for logging into Docker.
- 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
- Ripgrep for searching files and directories
- 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:
- 1Password for managing passwords and sensitive information
- Docker for containerization
- Google Chrome for web browsing
- iTerm2 for terminal emulation
- Loom for screen recording and sharing
- Microsoft Teams for office communication
- Rectangle for window management
- Slack for team communication
- Zoom for video conferencing
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 cleanupMake 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 shellcheckTest laptop script
shellcheck macTest customizations script
shellcheck ~/.laptop.localThis project includes pre-commit integration via Git hooks to automatically run formatting and linting checks before each commit.
These hooks help catch errors early and keep the codebase consistent across contributors.
make install-hooksThis will:
- Install pre-commit (if not already installed)
- Register a Git hook in .git/hooks/pre-commit
- Automatically run checks like:
- Linting with shellcheck and yamllint
make uninstall-hooksThis removes the Git pre-commit hook and disables automatic checks.
💡 Even with hooks uninstalled, you can still run the same checks manually with
make test.
Why Use Git Hooks?
- Ensures consistency across contributors
- Catches syntax and style issues before they hit CI
- Prevents accidental commits of broken or misformatted files
- Integrates seamlessly with your local workflow