Skip to content
forked from Mariana-Tek/laptop

A shell script which turns your Mac into an awesome web development machine.

License

Notifications You must be signed in to change notification settings

bashhack/laptop

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laptop

Laptop is a script to set up an MacOS computer for web development.

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

⚠️ At this time, this installation script is compatabile with M1 chip architecture and MacOS Monterey.

Should you find yourself on a different OS version or an older Intel-based architecture, tread carefully. Older versions may work but aren't actively tested. Please see DEPRECATED.md for more info.

⚠️ Before proceeding with the installation steps below, please ensure both Homebrew and the Xcode Command Line Tools have been installed and are updated to the latest versions.

This can be done by executing the following commands:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
xcode-select --install

NOTE: If you see the following message after executing the above command, double-check the System Preferences' 'Sofware Update' option to manually confirm whether any XCode Command Line Tool updates are available:

xcode-select: error: command line tools are already installed, use "Software Update" to install updates

For troubleshooting either of the above, see upstream vendor docs/resources.

Install

Begin by opening the Terminal application on your Mac. The easiest way to open an application in MacOS is to search for it via [Spotlight]. The default keyboard shortcut for invoking Spotlight is command-Space. Once Spotlight is up, just start typing the first few letters of the app you are looking for, and once it appears, press return to launch it.

In your Terminal window, copy and paste each of these two commands one at a time, then press return after each one to download and execute the script, respectively:

curl --remote-name https://raw.githubusercontent.com/Mariana-Tek/laptop/master/mac
bash mac 2>&1 | tee ~/laptop.log

The script itself is available in this repo for you to review if you want to see what it does and how it works.

NOTE: ⚠️ The script may ask you to enter your MacOS password at various points. This is the same password that you use to log in to your Mac.

Tips & Tricks for M1

Please see Tips & Tricks Wiki for specific setup necessary to complete the configuration of installed software included in the mac script.

Uninstall

To revert the state of your local development environment, removing the applications and configuration installed by Laptop, we have provided a rudimentary script to uninstall Laptop.

It presumes that you may have installed additional packages via Homebrew and will target the applications installed by Laptop only. Likewise, it presumes that you may wish to retain Homebrew itself.

In your Terminal window (NOTE: Do not select iTerm for this task, as it will be removed!), copy and paste each of these two commands one at a time, then press return after each one to download and execute the script, respectively:

curl --remote-name https://raw.githubusercontent.com/Mariana-Tek/laptop/master/mac_uninstall
bash mac_uninstall 2>&1 | tee ~/laptop.log

The script itself is available in this repo for you to review if you want to see what it does and how it works.

NOTE: ⚠️ The script may ask you to enter your MacOS password at various points. This is the same password that you use to log in to your Mac.

Debugging

Your last Laptop run will be saved to ~/laptop.log. Read through it to see if you can debug the issue yourself. If not, copy the lines where the script failed into a new GitHub Issue for us. Or, attach the whole log file as an attachment.

What it sets up

System Utilities

  • Homebrew for managing operating system libraries 🍻
  • wget for fetching content HTTP resources from the command line 📨

Terminal

  • iTerm2 for a great terminal 💻
  • Starship for an easy to configure, highly informative command prompt 🚀

Fonts

Datastores

Git

  • Git for pushing and pulling code to our repositories ↕️
  • GitHub Desktop for setting up your SSH keys automatically and committing code with a GUI ↕️

Browsers

Editors

Communication

  • Slack for communicating with your team 💬

Security

  • 1 Password for setting and getting secret credentials 🔐

DevOps

It should take less than 15-20 minutes to install (depends on your machine and internet connection).

Customize in ~/.laptop.local

Your ~/.laptop.local is run at the end of the mac script. Put your customizations there. This repo already contains a .laptop.local you can use to get started. It lets you install the following tools (commented out by default):

  • Sublime Text for a super fast, lightweight editor
  • Postman for testing APIs in a great GUI interface
  • Sketch for getting your designs looking right

For example:

#!/bin/sh

# brew cask install 'sublime-text'
# brew cask install 'postman'
brew cask install 'sketch'

Write your customizations such that they can be run safely more than once. See the mac script for examples.

Laptop functions such as fancy_echo, brew_install_or_upgrade, and brew_cask_install can be used in your ~/.laptop.local.

# Go to your MacOS user's root directory
cd ~

# Download the sample file to your computer
curl --remote-name https://raw.githubusercontent.com/Mariana-Tek/laptop/master/.laptop.local

Credits

This Mariana Tek project is based on ISL's iteration of 18F's laptop project, which was originally based on thoughtbot's laptop project.

Public domain

thoughtbot's original work remains covered under an MIT License.

18F's work on this project is in the worldwide public domain, as are contributions to our project. As stated in CONTRIBUTING:

This project is in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the CC0 1.0 Universal public domain dedication.

All contributions to this project will be released under the CC0 dedication. By submitting a pull request, you are agreeing to comply with this waiver of copyright interest.

Mariana Tek's original work is covered under a MIT License.

About

A shell script which turns your Mac into an awesome web development machine.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%