Today, I received my new MacBook, and I started to install applications and software for local development.
My typical development stack is based on PHP and JavaScript, but I'm learning also Go Lang and Rust.
I'm a macOS user for a decade, and I have my software list, but starting from scratch, allows me to ask myself if I should review my software list. For example, at the very beginning, I used Terminal.app as a console application, then I switched to iTerm2 (and it is great), but I would like to investigate if it is still the best option, today in 2022.
I would like to share the first applications or the first steps that I made with my new MacBook.
Table Of Contents
- Operating System: Upgrade the Operating system
- Browser: Brave
- Package/Application management: Homebrew
- Git/Source code management: Git
- Console/Terminal application: iTerm2
- Shell extension: Oh My Zsh
- Editor: Visual Studio Code
- Editor: Zed
- Font: JetBrains Mono
- Font: Monaspace
- All-in-one JavaScript runtime & toolkit: Bun
- PHP 8.4
- PHP Package manager: Composer
- Serving your local Web projects: Valet
- Managing Git repositories: GitHub Desktop
Upgrade the Operating System
In "System Preferences", there is the section "Software Update".
Be sure that your Operating System is updated.
Install Brave Browser
This is a personal choice. Some prefer Safari, and others prefer Mozilla Firefox. Personally, I used Chrome just because I'm more familiar with the "Developer Tools."
In recent weeks, I've been trying Brave because it is designed to respect the privacy of the end user. Under the hood, it uses Chromium, the same engine as Google Chrome.
Website: https://brave.com/
Install Homebrew
My suggestion is to install Homebrew as soon as possible because it helps with some dependencies (for example, it automatically installs Xcode Command Line tools).
Xcode Command Line tools are the most-needed utilities for software development.
And it is very useful later for installing PHP and some other tools like web server etc.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
The execution of the command will prompt for the administrator password. You need to insert your password.
Once you installed Homebrew you need to configure correctly environment variables:
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
Website: https://brew.sh/
If you need some "inspiration" about which packages/applications you would like to add to your new MacBook, James suggested that I take a look at his Brew file. So I'm going to share it with you all as well https://github.com/jwtodd/miscellany/blob/develop/Brewfile
Reference: https://twitter.com/jwtodd/status/1531529092998176768
Install Git
The first package I installed with Homebrew is Git. Why? Git is already included in Xcode Command Line Tools, but I prefer to have Git shipped with Homebrew, which is the most up-to-date. This is a personal choice, but if you want to have Git command continuously updated, you could probably consider installing the Homebrew version
brew install git
Install a new Terminal: iTerm2
I'm using iTerm2 instead of the out-of-the-box Terminal app for the console app.
Website: https://iterm2.com/
Shell extension: Install Oh My Zsh
If you are using a fresh new installation of macOS Sequoia (15), you probably have zsh as the default shell application. There is a great project named Oh My Zsh that extends the functionalities of zsh, providing some functions, helpers, and configurations.
To install Oh My Zsh:
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
Website: https://ohmyz.sh/
The editor: Visual Studio Code
One of the most popular editors is Visual Studio Code.
Website: https://code.visualstudio.com/
The alternative editor: Zed
Zed is my favorite editor; it is very fast, responsive, reliable, and configurable.
Website: https://zed.dev/
The Font: JetBrains Mono
I suggest you download and install a fixed-width font like https://www.jetbrains.com/lp/mono/
Jumping back to the Visual Studio Code configuration, my typical setup for fonts is:
{
"workbench.colorTheme": "Default Light+",
"editor.fontFamily": "JetBrains Mono, Menlo, Monaco, 'Courier New', monospace",
"editor.fontSize": 18,
"editor.lineHeight": 1.6
}
Website: https://www.jetbrains.com/lp/mono/
The additional Font: Monaspace
I suggest you download an additional font set from GitHub: Monaspace.
Website: https://monaspace.githubnext.com/
Install the JavaScript environment: Bun
I used Node + NPM for years, but I was really surprised when I tried Bun. Initially, I used Bun as an additional environment, an alternative to Node. Now, I'm setting up the second laptop only with Bun.
curl -fsSL https://bun.sh/install | bash
Website: https://bun.com/
Install PHP 8.4 via Homebrew
I suggest installing PHP via Homebrew, because Homebrew is great for managing dependencies needed by PHP, and useful, for example, if you want to install a PHP module. Installing PHP via brew command:
brew install php
It will install the latest version of PHP (8.4) with some dependencies like: apr, ca-certificates, openssl, apr-util, argon2, aspell, m4, autoconf, brotli, gettext, libunistring, libidn2, libnghttp2, libssh2, openldap, rtmpdump, zstd, curl, libtool, unixodbc, freetds, libpng, freetype, fontconfig, jpeg, giflib, imath, openexr, libtiff, webp, jpeg-xl, libvmaf, aom, libavif, gd, gmp, icu4c, krb5, libpq, libsodium, libzip, oniguruma, pcre2, readline, sqlite and tidy-html5.
The PHP module (for Apache) is located in: /opt/homebrew/opt/php/lib/httpd/modules/libphp.so
The ini files for PHP are located in:
/opt/homebrew/etc/php/8.4/
Website: https://www.php.net/
PHP Package manager: Composer
I suggest you to install the "standard de facto" package manager for PHP named Composer. My suggestion is to install it globally, in a global directory.
- how to download Composer: https://getcomposer.org/download/
- how to install globally Composer: https://getcomposer.org/doc/00-intro.md#globally
If you copy the composer binary into /usr/local/bin remember to:
- check if the bin directory in /usr/local exists (if not created it with
sudo mkdir -p /usr/local/bin
- move the binary
sudo mv composer.phar /usr/local/bin/composer
- add /usr/local/bin in your PATH environment. For example appending in your ~/.zshrc
export PATH=$PATH:/usr/local/bin/
Serving your Web projects with Valet
If you are a Web Developer, probably you have multiple projects on your local machine, and you want to expose them via HTTP, for example:
- Project 1, stored in a directory Sites/project1, served locally as http://project1.test
- Project 2, stored in a directory Sites/project2, served locally as http://project2.test
- Project 3, stored in a directory Sites/project3, served locally as http://project3.test
- ...
To achieve that, you need to configure correctly a web server (Nginx) and a tool for resolving your local hostnames (dnsmasq).
Valet is a tool that can do all this stuff for us.
Valet configure and install tools for you, like:
- Webserver: Nginx for serving files
- PHP / PHP-FPM: you already have installed PHP from previous steps but Valet will configure PHP to be used with Nginx via FPM
- Dnsmasq: for resolving locally your local domains name *.test (project1.test, project2.test etc)
composer global require laravel/valet
export PATH=$PATH:~/.composer/vendor/bin
valet install
Now you can instruct Valet for serving all directories included in a specific directory. In my case I have Sites directory where I have all my projects
mkdir Sites
cd Sites/
valet park
So, if you will have a directory Sites/mysite , thanks to Valet (that will use dnsmasq and nginx under the hood) a hostname http://mysite.test will be exposed locally.
Valet is more powerful than this, you can expose HTTPS, you can be more flexible in the configuration of your directory (not limited to the Sites directory) etc.
Website: https://laravel.com/docs/12.x/valet
Managing Git repositories: GitHub Desktop
I mainly use GitHub for open-source projects.
I'm using git on the command line, but sometimes, I would like to have a GUI for some operations. In the past (so far away), I used GitX. In the last five years, I've been using GitHub Desktop (but you can use it with a git repository in general, like Gitlab or Bitbucket).
Website: https://desktop.github.com/
Feedback
I know this is just a first list of a wider set of tools that a developer needs. But if you think I missed some very important tools, please let me know in the comments!
I will gladly try it and add them to this list.
Thank you!
Top comments (4)
Warp is a great terminal emulator and clicked with me way better, than iTerm2! My only deviation from this list is, that I use GitKraken as Git GUI.
GitHub Desktop always seemed a bit dated and Tower just isn't as intuitive to use IMHO.
personally I choose iTerm2 over warp.
Also don't forget fig
I would also recommend to take a look on the Kitty terminal and asdf as a version manager.
Excellent guide for setting up a new MacBook for development! It truly shows the many steps involved. I've personally found ServBay dramatically simplifies this whole process, giving me a powerful, fully configured local environment with much less manual setup. Great tips for anyone starting fresh!