Setting up a new developer machine can be an ad-hoc, manual, and time-consuming process. This repo aims to simplify the process with easy-to-understand instructions and dotfiles/scripts that automate the setup of:
- OS X updates and Xcode Command Line Tools
- Developer tools: Vim, bash, tab completion, curl, git, GNU core utils, Python, Ruby, etc
- Developer apps: iTerm2, Visual Studio Code, VirtualBox, Vagrant, Docker, Chrome, etc
- VIM: NVIM and TMUX development
- AWS: Amazon Web Services (AWS CLI, AWS SAM CLI)
- Common data stores: MySQL, PostgreSQL, MongoDB, Redis, and Elasticsearch
- Javascript web development: Node.js, JSHint, and Less
- Java development: Java, Eclipse, SDKManager
You can also automate the process by running a single setup script to install and configure specified sections.
Credits: This repo builds on the awesome work from Mathias Bynens and Nicolas Hery and Donne Martin.
$ git clone https://github.com/gallor/dev-setup.git && cd dev-setup
Since you probably don't want to install every section, the setup.sh
script supports command line arguments to run only specified sections. Simply pass in the scripts that you want to install. Below are some examples.
Run all:
$ ./setup.sh all
Runs all scripts
$ ./setup.sh bootstrap osxprep brew osx
Run bootstrap.sh
, osxprep.sh
, brew.sh
, and osx.sh
, and datastores.sh
:
$ ./setup.sh bootstrap osxprep brew osx datastores
$ curl -O https://raw.githubusercontent.com/gallor/dev-setup/master/setup.sh && ./setup.sh [Add ARGS Here]
For more customization, you can clone or fork the repo and tweak the .dots
script and its associated components to suit your needs.
- setup.sh
- Runs specified scripts
- osxprep.sh
- Updates OS X and installs Xcode command line tools
- bootstrap.sh
- Syncs dev-setup to your local home directory
~
- Syncs dev-setup to your local home directory
- brew.sh
- Installs common Homebrew formulae and apps
- vim.sh
- Sets up NVIM and Tmux
- aws.sh
- Sets up AWS CLI
- datastores.sh
- Sets up common data stores
- web.sh
- Sets up JavaScript web development
- java.sh
- Sets up Java and Android development
- devops.sh
- Sets up Devops development tools
- python.sh
- Sets up Python tools
Notes:
setup.sh
will initially prompt you to enter your password.setup.sh
might ask you to re-enter your password at certain stages of the installation.- If OS X updates require a restart, simply run
setup.sh
again to resume where you left off. setup.sh
will also prompt you if this is the first time you're running this script. If yes all dotfiles (currently in another repo) are synced to your local machine sobootstrap.sh
can properly sync all the files.- This repo is located at the dotfiles repo. I chose to split them out into different repos for to keep my dotfiles separate from computer setup.
- When installing the Xcode command line tools, a dialog box will confirm installation.
- Once Xcode is installed, follow the instructions on the terminal to continue.
setup.sh
runsbrew.sh
, which takes awhile to complete as some formulae need to be installed from source.- When
setup.sh
completes, be sure to restart your computer for all updates to take effect.
The bootstrap.sh
script will sync the dev-setup repo to your local home directory. This will include customizations for Vim, bash, curl, git, tab completion, aliases, a number of utility functions, etc. Section 2 of this repo describes some of the customizations.
First, fork or clone the repo. The setup.sh
script will pull in the latest version and copy the files to your home folder ~
:
$ source setup.sh
To update later on, just run that command again.
Alternatively, to update while avoiding the confirmation prompt:
$ set -- -f; source bootstrap.sh
To sync dev-setup to your local home directory without Git, run the following:
$ cd ~; curl -#L https://github.com/gallor/dev-setup/tarball/master | tar -xzv --strip-components 1 --exclude={README.md,bootstrap.sh,LICENSE}
To update later on, just run that command again.
If ~/.path
exists, it will be sourced along with the other files before any feature testing (such as detecting which version of ls
is being used takes place.
Here’s an example ~/.path
file that adds /usr/local/bin
to the $PATH
:
export PATH="/usr/local/bin:$PATH"
When setting up a new Mac, you may want to install Homebrew, a package manager that simplifies installing and updating applications or libraries.
Some of the apps installed by the brew.sh
script include: Chrome, Firefox, VS Code, Dropbox, Evernote, Skype, Slack, VirtualBox, Vagrant, etc. For a full listing of installed formulae and apps, refer to the commented brew.sh source file directly and tweak it to suit your needs.
Run the brew.sh
script:
$ ./brew.sh
The brew.sh
script takes awhile to complete, as some formulae need to be installed from source.
To set up common data stores, run the datastores.sh
script:
$ ./datastores.sh
To set up a JavaScript web development environment, run the web.sh
script:
$ ./web.sh
To set up an Android development/java environment, run the java.sh
script:
$ ./java.sh
To set up DevOps tools, run the devops.sh
script:
$ ./devops.sh
To set up Python tooling, run the python.sh
script:
$ ./python.sh