MacBook with Homebrew
Set up an ARM-chip MacBook as developer machine using Homebrew as package manager.
Introduction
This document covers how to set up an ARM64 Macbook as a developer machine. It is geared towards Go, Python, JavaScript and Java development.
All commands on this page should be executed from the user’s home directory.
For using MacPorts instead of Homebrew as the package manager, refer to MacBook with MacPorts.
Install xcode command line tools
xcode-select --install
Install homebrew
Use the macOS default Terminal app.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
eval $(/opt/homebrew/bin/brew shellenv)
brew update
brew upgrade
Add the following line to both ~/.zshrc and ~/.bash_profile. Restart terminal.
eval $(/opt/homebrew/bin/brew shellenv)
Use the latest version of bash
brew install bash bash-completion@2
Put bash inside /usr/local/bin and add it to /etc/shells.
pushd /usr/local/bin
sudo ln -s /opt/homebrew/bin/bash
popd
echo '/usr/local/bin/bash' | sudo tee -a /etc/shells
Change the default shell for human admin user to /usr/local/bin/bash.
chsh -s /usr/local/bin/bash
Change the default shell for root to /bin/bash.
sudo chsh -s /bin/bash
Restart computer for the default shell change to take effect.
Install ghostty
Go to the download page. Download the package installer and use it.
From now on perform all CLI operations in Ghostty.
Install essential utilities
brew install fzf bat tree jq yq
Install coding tools
When coding, run NeoVim inside Tmux sessions.
brew install git neovim ripgrep luarocks tmux pre-commit
Install go
brew install go
Install uv
brew install uv
Install documentation tools
brew install hugo
Install fnm
fnm is a Node versions manager that doesn’t cause a noticeable slow down at activation.
The CLI interface is largely similar to that of nvm.
brew install fnm
Install aws cli v2
After installation, pin it to avoid unnecessary frequent version upgrade. It’s enough to upgrade for every minor version bump only.
brew install awscli
brew pin awscli
Install github cli
For authentication against GitHub, the most convenient option is to use the GitHub CLI. To install, run the following commands.
brew install gh
Login immediately.
gh auth login
Install shellcheck
brew install shellcheck
Install rustup
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Set up GPG to sign git commits
Install gnupg and pinentry-mac. The former is the GPG software while the latter is a GUI for prompting for passphrases.
brew install gnupg pinentry-mac
echo "pinentry-program $(which pinentry-mac)" >> ~/.gnupg/gpg-agent.conf
Restart gpg-agent.
gpg-connect-agent reloadagent /bye
Enter GPG interactive mode by gpg --card-edit, and then enter the fetch and quit command in order.
The outputs would be something like below.
gpg/card> fetch
gpg: requesting key from 'https://github.com/kxue43.gpg'
gpg: key C9EED408F4B6D021: "Sato Seinosuke (kxue43.github.io) <kxue43@gmail.com>" not changed
gpg: Total number processed: 1
gpg: unchanged: 1
gpg/card> quit
Then use gpg --list-secret-keys to confirm that the keys have been fetched.
The outputs should be something like below.
[keyboxd]
---------
sec> rsa4096 2025-12-24 [SC]
5EF2BE73370DCE7E808814DBC9EED408F4B6D021
Card serial no. = 0006 27538718
uid [ unknown] Sato Seinosuke (kxue43.github.io) <kxue43@gmail.com>
ssb> rsa4096 2025-12-24 [E]
Install go executables
go install github.com/kxue43/cli-toolkit/cmd/toolkit@latest
go install github.com/kxue43/cli-toolkit/cmd/toolkit-assume-role@latest
go install github.com/kxue43/cli-toolkit/cmd/toolkit-serve-static@latest
go install github.com/kxue43/cli-toolkit/cmd/toolkit-show-md@latest
go install mvdan.cc/sh/v3/cmd/shfmt@latest
go install golang.org/x/tools/cmd/godoc@latest
go install golang.org/x/pkgsite
go install github.com/air-verse/air@latest
Install rust executables
cargo install --locked tree-sitter-cli
Install claude code
brew install --cask claude-code
Set up personal platform
mkdir -p ~/.config
git clone https://github.com/kxue43/substance ~/.config/substance
~/.config/substance/set-up.sh
Restart the terminal so that Bash start-up files take effect.
Then open up nvim and run :MasonInstallAll, :TSInstallAll, :checkhealth.