nimblehq / laptop

A shell script which turns your OS X laptop into an awesome web development machine
MIT License
27 stars 12 forks source link
javascript laptop-dotfiles process ruby shell

Nimble logo


Laptop is a script to set up a macOS environment for web development.

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

Requirements

[!NOTE] Both Apple Silicon and Intel are supported

Older versions may work but aren't regularly tested. This script is tested on the most recent and its previous version.

Install

Download, review, then execute the script:

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

Choose the additional packages when the prompts appear:

Do you want to install Web's dependencies? [y|N]
Do you want to install iOS's dependencies? [y|N]
Do you want to install Android's dependencies? [y|N]

What it sets up

Default

Applications:

Source Code versioning:

Terminal:

Utilities:

Web

Tools:

Command Line Interfaces:

Plugins for asdf:

iOS

Android

It should take less than 15 minutes to install (depending on your machine and internet speed).

M1 incompatible dependecies

It will omit all these dependencies above while running the script in the M1 machines.

Customize in ~/.laptop.local

Your ~/.laptop.local is run at the end of the Laptop script. Put your customizations there. For example:

#!/bin/sh

cask "dropbox"
cask "firefox"

brew "tree"

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 gem_install_or_update can be used in your ~/.laptop.local.

See the wiki for more customization examples.

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.

Contributing

Edit the mac file. Document in the README.md file. Follow shell style guidelines by using ShellCheck and Syntastic.

brew install shellcheck

License

It is free software, and may be redistributed under the terms specified in the LICENSE file.

About

Nimble

This project is maintained and funded by Nimble.

Inspired by the project of Thoughtbot.

We love open source and do our part in sharing our work with the community! See our other projects or hire our team to help build your product.