My Ultimate Apple Silicon Developer Setup

(Updated) Get your new Mac ready for code!

Richard So
Geek Culture
7 min readAug 17, 2022

--

RIP Intel (Image from Apple)

More than a year ago, I wrote up a story on how one goes about setting up an M1 Mac for some programming and development. Not only is it super outdated at this point, but boy was my writing BAD.

This guide is an updated remaster of that atrocity, though you’ll still find some similar elements. Let’s jump right into it, shall we?

Here’s My Ultimate M1, M1 Pro, M1 Max, M2, etc… Developer Setup Guide!

NOTE: Most of your setup happens on the command line. Copy-paste commands (not including the $) onto your terminal as you encounter them below.

Step 0) Rosetta 2

$ /usr/sbin/softwareupdate --install-rosetta --agree-to-license

Rosetta is a compatibility layer that allows apps not yet updated for the latest Apple Silicon chips (M1, M2, and so on…) to be emulated with reasonable performance. Chances are that you’ll come across one of these apps in the future (*cough* MATLAB), so I suggest you install it right now than later.

1) XCode Command Line Tools

My favorite.
$ xcode-select --install

XCode gets a bad rap from what I’ve seen in the community (excluding iOS/macOS devs), but you’ll likely need it before you set up everything else, let alone do some developer work.

Well, only a portion of it; you actually need the XCode Command Line Tools (CLT), which includes essential stuff like git , clang , and more. Install just the XCode CLT if you are not planning on touching Swift since you’ll save ≈20 GB of storage.

2) Package Manager (Homebrew)

`brew install homebrew` :P (Image Source; don’t actually run that command)
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Homebrew is the apt or pacman for macOS, where you can quickly install almost anything onto your machine without using a sus installer you found on downloads.com. Don’t worry about making a “Rosetta” version of homebrew, since its Apple Silicon version has matured drastically since my last story.

As a heads up, we’ll be using homebrew (brew) a lot in the later steps!

3) Terminal Emulator (iTerm2)

$ brew install --cask iterm2

You’ve probably been following along with the crappy default terminal that comes with macOS. Don’t torture yourself: get iTerm2. Here’s why.

Now for some quality-of-life settings that I suggest you set on iTerm2:

Voila, you now have a slick terminal emulator interface that you can pull from anywhere with a keybinding!

I ❤️ iTerm2, but not bash 🤬

4) Terminal Shell (Zsh & oh-my-zsh)

So… your emulator is dope, but not your shell. We’ll go change that right now.

zsh is bae (powerlevel10k theme with macchina, see below)
$ chsh -s /bin/zsh

This changes your default shell to Zsh, which is the default for macOS nowadays. Even if you are on Zsh, just execute to make sure it persists.

$ sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)

Now for the juicy part: installing and setting up oh-my-zsh! It’s a “community-driven framework” for your terminal shell with a whopping 140k stars on GitHub, meaning that there are a ton of awesome plugins for you to find.

Notable Zsh Plugins + Themes

These are my all-time favorite plugins/themes to use with Zsh. Use their READMEs for instructions to install on oh-my-zsh.

  • zsh-autosuggestions is exactly as its name suggests (10/10 I’m so punny): it’s a powerful plugin that suggests completions as you type, based on your shell commands history.
  • zsh-syntax-highlighting brings syntax coloring support to your Zsh shell. With this, you’ll be able to spot mistypes before executing commands.
  • powerlevel10k is an awesome-looking theme for Zsh that’ll instantly turn you into hackerman!

5) Programming Languages (asdf)

The Ballad of asdf
$ brew install asdf--- then, add `asdf` in plugins list on ~/.zshrc ---plugins = ( ... asdf)

Installing multiple language runtimes separately is now officially cringe. With asdf, you can manage multiple versions of Python, Node.js, Java, Go, and so on, with the same set of commands. As a cherry on top, there’s a plugin for asdf on oh-my-zsh to handle pathing and command autocompletion!

asdf uses a file .tool-versions on your home directory to keep track of your default runtime versions, however, it also supports version files from other version managers.

5.1) Node.js

Here’s a scenario: You’re a soydev with a shiny new MacBook Pro and want the latest Node.js runtime to continue work on your billion-dollar app idea (that is, a to-do list built with copy-pasted React code). Relatable, I’m sure. Here’s how to do it on asdf:

$ asdf plugin-add nodejs$ asdf install nodejs latest$ asdf global nodejs latest$ node (or npm)

There you go! You’ll see that I first added a plugin onto asdf—this is how you’ll add support for a new language runtime in asdf. global sets the default Node.js version on your machine to be what you just installed.

5.2) Python

It’s literally the same. Very based!

$ asdf plugin-add python$ asdf install python latest$ asdf global python latest$ python (or pip)

To explore more of what asdf can do, read their documentation/references. Visit here to find & add asdf plugins for whatever language(s) you’ll program in.

6) IDE / Code Editor (Visual Studio Code)

At this point, just call VSCode an IDE
$ brew install --cask visual-studio-code--- or a non-Microsoft-telemetry version ---$ brew install --cask vscodium

I used to be a fan of VScode, but now I’m a wind turbine…

With 74% of all devs using VSCode with me. Using a couple of extensions, anyone can turn VSCode into an IDE for any sort of development (if you don’t count Swift and MATLAB -_-).

Also, what’s a good IDE without a good font? I really like Fira Code with ligatures on VSCode and any other code editor I use.

Essential VSCode Themes & Extensions

Here are some of the extensions I personally use a ton on VSCode:

  • Noctis is a collection of aesthetic dark (and light) themes. I personally use the Noctis Azureus variant, and it’s amazing!
  • indent-rainbow makes indentation easier to read by color-coding tab steps. Especially useful for python scripting.
  • Error Lens prints warnings and errors inline with your code so you don’t waste your time hovering over red squiggly lines.
  • Code Runner runs almost any file (.py, .js, .java, etc.) you give to it.
  • Github Copilot writes code for you. Seriously, it knows—90% of the time—exactly what I’m going to code, so I don't have to 😛.

JetBrains, anyone?

$ brew install --cask jetbrains-toolbox

PyCharm, IntelliJ, Webstorm, etc. are still nice choices if you're more into a traditional, specialized, and all-batteries-included development environment. Personally, I use JetBrains Toolbox to install and update their IDEs (including Android Studio), but you can install each of them individually using brew if you so choose.

7) Bonus Goodies

Here are some other stuff I’ll throw in that’ll be a great addition to your setup (installable using brew):

  • exa is ls but better. Pro tip: include alias ls=”exa --icons -lh” in your ~/.zshrc file.
Look at how snazzy exa is!
  • macchina gives you a brief, customizable, and nice-looking overview of your system stats.
  • tokei gives you code stats for any directory or project.
  • AltTab is a must-have if you hate macOS’s ⌘-Tab.
Source: AltTab

That’s a wrap!

Hope this write-up saved you some hours with your brand new Mac! If you found my guide helpful, or if you have any suggestions, let me know in the comments section. Cya! 👋

--

--

Richard So
Geek Culture

https://sorichard.com | BS/MS CS @ Georgia Tech, Class of ’25. Pursuing everything code. Always learning!