Back to Digital garden

My dev environment setup (Mac)

Basic dev env setup for my mac. For reference.

Published:

Initial installation

  • Install iTerm 2 as terminal alternative for mac.
  • IDE of your choice: VSCode, Cursor, etc. For this setup, I’ll be using nvim.

Set up Oh My Zsh

Install Homebrew

Homebrew is a package manager for macOS that simplifies installing, updating, and managing command-line tools from the terminal

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Install zsh and oh-my-zsh

Your terminal doesn’t have to suck. Install Oh-my-zsh for a delightful way of managing your zsh configuration. oh-my-zsh is an open-source, community-driven framework with lots of plugins and themes to spruce up your command-line experience.

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

Set up your git

Your mac should have git shim by default. Run git in the command line to check.

git

Set up your git credentials

git config --global user.name "yourusername"
git config --global user.email youremail@email.com

Set up your SSH Key

From SSH Academy: An SSH key is an access credential in the SSH protocol. Its function is similar to that of user names and passwords, but the keys are primarily used for automated processes and for implementing single sign-on by system administrators and power users.

The simplest way I can put this from a non-dev perspective is that by setting your SSH key, you’re creating a digital key for your computer and telling Github to trust it, so you can push and pull code without typing your username and password every time.

Generate a new SSH key

Based from Github Docs You can generate a new SSH key on your local machine. After you generate the key, you can add the public key to your account on Github.com to enable authentication for Git operations over SSH.

ssh-keygen -t ed25519 -C "your_email@example.com"

You will then be prompted by

> Enter a file in which to save the key (/home/YOU/.ssh/id_ALGORITHM):[Press enter]

to which you can just press Enter to accept the default file location. Next, you’ll be prompted to type a secure passphrase.

> Enter passphrase (empty for no passphrase): [Type a passphrase]
> Enter same passphrase again: [Type passphrase again]

You can then copy the SSH key

pbcopy < ~/.ssh/id_ed25519.pub

then add Github fingerprint to known hosts

ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts

Add your SSH key to your Github

In Github, go to Settings > SSH and GPG keys. On the SSH keys section, click on the New SSH key button and paste your SSH key.


Install Nodejs + NPM

Node.js is a free, open-source, cross-platform Javascript runtime environment. NPM is the package manager that lets you install, update, and manage reusable code libraries that your project can use.

# Download and install nvm:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash

# in lieu of restarting the shell
\. "$HOME/.nvm/nvm.sh"

# Download and install Node.js:
nvm install 24

# Verify the Node.js version:
node -v # Should print "v24.13.0".

# Verify npm version:
npm -v # Should print "11.6.2".

Install Neovim and Lazyvim

I’ve only recently moved to Neovim from Vim ever since I’ve experienced it in Omarchy. We’ll install Neovim with Homebrew.

brew install neovim

# Check if it works:
nvim .

Next, we’ll install Lazyvim, which makes it easier to customize and extend our Neovim config

git clone https://github.com/LazyVim/starter ~/.config/nvim

You can remove the .git folder so you can add it to your own repo later

rm -rf ~/.config/nvim/.git
Tip

For macOS, you might need to download and install any Nerdfont so it can show the iconfonts in Neovim. To use the font you have downloaded and installed, Go to iTerm2’s Settings > Profiles > Text and on the Font field, select the font you have installed.

Install Cursor

I use Cursor for vibe coding, especially when doing Javascript stuff that I don’t have the skill to do. I still use Neovim for when I want to manually code. Just download and install Cursor for macOS. When you open Cursor for the first time, it’ll ask you some preferences on keybindings and if you want to install cursor as a terminal command. Install that so you can instantly open the current folder within Cursor.

# Assuming you are in your project directory
cursor .