fsylum.net

Setting Up macOS for Web Development

· 4 minutes read

I recently got a new Macbook Pro 14" as my new work laptop so I’ve been busy setting up the machine. It’s a base model with an M1 chip, which I’m particularly looking forward to trying. Having worked with Windows and Arch Linux before, there are some challenges, especially a shift in thinking but overall, I am very surprised to find out most of the stuff works out of the box pretty well.

I’m documenting my process and this will serve as a living document for me to refer to once I’ve updated my setup.

Homebrew

You can’t talk about macOS without Homebrew. It’s the de-facto package manager for macOS and the installation guide works fine for M1 architecture.

Once it’s installed, I’ve also installed some other tools such as bat, PHP, and Git via brew install command.

Side note: You can install multiple PHP versions on your machine via brew install [email protected], brew install [email protected], etc, and use the brew link/unlink command to set the default version used in your machine. For example to switch the default version used from 8.1 to 7.4:

brew unlink [email protected]
brew link [email protected]

Other applications

Most of the stuff that I use can be either downloaded from their official site, or installed from the App Store, and I haven’t had any compatibility issue with M1 architecture just yet.

Some of the apps that I have:

Docker

Docker support for M1 architecture has been not much of an issue currently. At work, I’m using Altis Local Server which has been supporting ARM/Apple M1 since v9. For my side projects, I’ve also added support to switch the underlying MySQL engine for my docker-lemp and haven’t had any issues since.

Terminal Setup

I used Alacritty in Arch Linux but for macOS, I decided to go with iTerm2. It’s good enough to get the job done.

Some pointers:

Oh My Zsh

Since the configuration is OS-agnostic, I copied over my existing configuration from Arch Linux to this machine. My theme of choice is essembeh and I installed several plugins:

Generally, I don’t use any alias-related plugins. I might be in the minority who likes to type in the full command instead of using aliases.

There’s also a useful package called zsh-syntax-highlighting that provides syntax higlighting as you type.

Other CLI tools

I don’t have many installed. For now, I have:

Code Editor

Using VS Code at the moment, after 9 years with Sublime Text. Lots of adjustments need to be made, worthy of a separate post about my whole setup. Probably soon!