Prepare by switching out of bash from Homebrew:
chsh -s /bin/bash
To clean my system and reinstall Homebrew:
rm -rf ~/.local && mkdir ~/.local
rm -rf ~/Library/Caches/pip
rm -rf ~/.pyenv
rm -rf ~/.config/yarn
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Then I run brew doctor
and resolve any issues that it finds.
On fresh OS installs, I usually need to run:
xcode-select --install
Once all is good, I install some base packages:
brew install git zsh go hub glide yarn
brew tap homebrew/command-not-found
brew tap homebrew/completions
brew install pyenv
There is no technical reason for the grouping. I like the logical grouping.
Get Homebrew bash setup by ensuring /usr/local/bin/zsh
is in /etc/shells
then run:
chsh -s /usr/local/bin/zsh
Python:
pyenv install 3.6.2 && pyenv install 2.7.13
pyenv global 3.6.2 2.7.13
[.bashrc] To initialize pyenv:
if which pyenv > /dev/null; then
eval "$(pyenv init -)";
fi
At this point I will usually kill Terminal.app and start it up to ensure my shell environment is clean and using things from my new /usr/local
install.
I use pipsi to handle system-level Python packages that want to expose commands for me:
pip install pipsi
pipsi install httpie
pipsi install slack-cli
pipsi install pipenv
pipsi install coreapi-cli
Make sure to add ~/.local/bin
to your PATH
.
minikube:
curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.22.1/minikube-darwin-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
ec:
(export dest=$HOME/.local/bin ; curl -s https://storage.googleapis.com/ec-cli/ec-v0.8.0_darwin-amd64 > $dest/ec && chmod +x $dest/ec)
Finally, here is a running list of software I install on my machine:
brew install redis watch caddy ack awscli coreutils curl dnsmasq elasticsearch gnu-tar gpg-agent hugo ipfs jq mercurial mongodb moreutils netcat pinentry pv socat wget xz neovim
Update pipenv:
~/.local/venvs/pipenv/bin/pip install --upgrade pipenv