Laptop is a shell script which turns your Mac into an awesome web development machine.
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.
- Homebrew for managing operating system libraries
- Homebrew Cask for quickly installing Mac apps from the command line
- Homebrew Services so you can easily stop, start, and restart services
- Zsh as your shell
- Node / NPM
- Yarn An alternative to NPM
- Mailhog for local development email testing
- Docker
- Minikube
- Kubernetes-cli
- Google Cloud SDK
- AWS CLI
- Azure CLI
- [MySQL] for storing relational data
- [Postgres] for storing relational data
- Redis
It should take less than 15 minutes to install (depends on your machine and internet connection).
To install, open a terminal and run the install script:
bash <(curl -s https://raw.githubusercontent.com/cds-snc/laptop/master/laptop)
Important: After installation, be sure to quit and restart Terminal for changes to take effect.
It is highly recommended to run the script regularly to keep your computer up to date. Once the script has been installed, you'll be able to run it at your convenience by typing laptop
and hitting return in your Terminal.
To customize your laptop setup, open a Terminal and execute the following commands:
# Go to your home directory
cd ~
# Download the files to your computer
curl --remote-name https://raw.githubusercontent.com/cds-snc/laptop/master/.laptop.local
curl --remote-name https://raw.githubusercontent.com/cds-snc/laptop/master/Brewfile.local
These config files will add a few extra packages that you may find useful, including:
- Atom GitHub's open source text editor
- BBEdit Another great text editor
- Dropbox File sharing/storage
- Skype For video conferencing
If you want to install additional tools or Mac apps with Homebrew, you may add further customizations to your ~/Brewfile.local
.
The script does not automatically launch these services after installation because you might not need or want them to be running. With Homebrew Services, starting, stopping, or restarting these services is as easy as:
brew services start|stop|restart [name of service]
For example:
brew services start mysql
brew services start mailhog
To see a list of all installed services:
brew services list
To start all services at once:
brew services start --all
-
Find out which shell you're currently running:
echo $SHELL
-
Find out the location of the shell you want to switch to. For example, if you want to switch to
bash
, runwhich bash
. -
Verify if the shell location is included in
/etc/shells
. Runcat /etc/shells
to see the contents of the file. -
If the location of the shell is included, run
chsh -s [the location of the shell]
. For example, ifwhich bash
returned/bin/bash
, you would runchsh -s /bin/bash
.If the location of the shell is not in
/etc/shells
, add it, then run thechsh
command. If you have Sublime Text, you can open the file by runningsubl /etc/shells
. -
Quit and restart Terminal (or iTerm2), or open a new tab for the new shell to take effect.
Whether you're using bash or zsh, we recommend installing the latest versions with Homebrew because the versions that came with your Mac are really old.
brew install bash
or
brew install zsh
This CDS script is based on the 18F/Laptop and in turn thoughtbot's laptop script.
thoughtbot's original work remains covered under an MIT License