I recently did a factory reset on my MacBook Pro. I thought that during the process I would write down what steps I took and what tools I used to get it ready for Elixir/Phoenix development. I am on MacOS 10.15.4
First thing I always do is install homebrew. Just follow the directions on the official website.
brew cask to install almost everything. The only exceptions to this are programming languages (see below) Here's a list of everything I install on a fresh machine. Use
brew cask <package> to install.
1password # My password manager of choice firefox # I try to avoid the the tentacles of Google, so I use Firefox clipy # Clipboard managers are invaluable basecamp # I use basecamp personal (free) to keep track of what I am working on visual-studio-code # Editor of choice firacode # font of choice email@example.com # required for elrang postgres # postgres.app postico # postgres ui tool
(Oh My Zsh)[https://ohmyz.sh/#install] is a must for me. Just follow the directions on the website. Since new versions of MacOS ship with ZSH as the default shell, its easier than ever. But if you are on an older version, you may need to install and set Zsh as your default shell. I use the
gallois theme, and add the
With all that installed, next is asdf-vm, my package manager of choice for programming languages. The main benefit it has over brew is that you can install older versions of programming languages, which isn't always possible with brew. Additionally, its nice to have one command for everything, rather than keeping track of kerl, kiex, nvm, etc. separately.
Head over to asdf to install. You can also use brew, but I prefer the git installation. Again, this lets me roll back if I need to. There is an issue with
kerl the package manager that
asdf uses behind the scenes, and the version of MacOS that I am on (10.15.4). Check out the following post to get it working: https://dev.to/andresdotsh/how-to-install-erlang-on-macos-with-asdf-3p1c
I am currently using the following versions, but you should use whatever is latest (
asdf list-all <language>):
erlang 22.3.2 # takes a long time elixir 1.10.3-otp-22 nodejs 14.0.0
You can set these (or whatever version) as the global default by using
asdf global <language> <version>, ex:
asdf global elixir 1.10.3
With that setup, we are almost done! Next is VSCode.
I use the following packages
Elixir LS # Aboslutely a must have Beautify # Formatting html dark+ Elixir
And I use the following settings in my
"beautify.language" is crucial to get autoformatting working correctly for
Finally, set up your SSH keys so that you can clone and push your repositories. I primarily use Gitlab for my own personal projects (another blog post), and GitHub for things I intend to be public. Follow the instructions on Gitlab to setup a key, and add them to your accounts.
That's basically everything I did to set up my Mac for Phoenix and Elixir development in 2020. If I missed anything, or you just want to share what your setup looks like, comment below!