Introduction
Spent £3,000 on this setup. Runs Chrome like a dream... until I open a second tab 😂. Jokes aside, this is a guide to setting up your and high-likely my Mac for development, including tools, configurations, and best practices. As favorite tools and practices change, this guide will be updated. Welcome to "It's not much, but it's mine" - Every $5000 Setup.
And do not skip the Awesome Mac repo.
System Preferences
Trackpad
- Tap to click (Enable)
Finder
Open Finder and go to Settings > Preferences > Advanced:
- Show all filename extensions (Enable)
- Remove items from the Trash after 30 days (Enable) *optional.
Show the path bar in Finder:
Open Finder and go to View > Show Path Bar:
Input Sources
Go to Settings > Keyboard > Input Sources:
If not US bought Mac and you are using a US keyboard layout, you can add the U.S and U.S - PC input sources.
- Add
U.SandU.S - PCinput sources.
Xcode Command Line Tools
XCode is a suite of development tools produced by Apple.
To install the Xcode Command Line Tools, open a terminal and run the following command:
xcode-select --installxcode-select --installHomebrew
Homebrew is a package manager for macOS. It allows you to install software packages from the command line.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"Or install .pkg from github releases here 4.4.20
Verify the installation
brew doctorbrew doctorTo install a package using Homebrew, use the brew install command followed by the package name. For example, to install Git, run:
brew install gitbrew install gitHomebrew Cask
Homebrew Cask brings its elegance, simplicity, and speed to the installation and management of GUI macOS applications such as Visual Studio Code and Google Chrome.
No more dragging and dropping applications into your Applications folder. Homebrew Cask will automatically download and install the application for you.
To install Homebrew Cask, run the following command:
brew tap homebrew/caskbrew tap homebrew/caskTo install an application using Homebrew Cask, use the brew install --cask command followed by the application name. For example, to install Visual Studio Code, run:
brew install --cask visual-studio-codebrew install --cask visual-studio-codeSome useful applications to install using Homebrew, search packages here:
e.g. alfred https://formulae.brew.sh/cask/alfred#default
To install multiple applications at once, separate the application names with spaces:
brew install --cask \
qlcolorcode \
qlstephen \
qlmarkdown \
quicklook-json \
qlprettypatch \
quicklook-csv \
betterzip \
webpquicklook \
suspicious-packagebrew install --cask \
qlcolorcode \
qlstephen \
qlmarkdown \
quicklook-json \
qlprettypatch \
quicklook-csv \
betterzip \
webpquicklook \
suspicious-packagebrew install --cask \
alfred \
android-file-transfer \
appcleaner \
caffeine \
cheatsheet \
colloquy \
docker \
doubletwist \
dropbox \
google-chrome \
google-hangouts \
flux \
1password \
rectangle \
sublime-text \
superduper \
transmission \
valentina-studio \
vlcbrew install --cask \
alfred \
android-file-transfer \
appcleaner \
caffeine \
cheatsheet \
colloquy \
docker \
doubletwist \
dropbox \
google-chrome \
google-hangouts \
flux \
1password \
rectangle \
sublime-text \
superduper \
transmission \
valentina-studio \
vlcTerminal
install iTerm2 if you are fan of their terminal but I'm quite happy with the default terminal.
brew install --cask iterm2brew install --cask iterm2ZSH
The Z shell (Zsh) is a Unix shell that can be used as an interactive login shell and as a command interpreter for shell scripting. It is now by default on macOS.
Install Zsh using Homebrew:
brew install zshbrew install zshThe configuration file for zsh is called .zshrc and lives in your home folder (~/.zshrc).
Oh My Zsh + Powerlevel10k
Oh My Zsh is an open-source, community-driven framework for managing your Zsh configuration. It comes bundled with a ton of helpful functions, helpers, plugins, and themes.
Install Oh My Zsh using
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"The installation script will prompt you to set Zsh as your default shell. Type y to confirm. if you want to change it later, you can run chsh -s /bin/zsh.
Configuration
The Official Wiki is a great place to start. You can find a list of plugins and themes there.
Plugins I use:
plugins=(
git
kubectl
zsh-autosuggestions
zsh-syntax-highlighting
)plugins=(
git
kubectl
zsh-autosuggestions
zsh-syntax-highlighting
)kubectl - kubectl is a command-line tool for Kubernetes. This plugin provides autocompletion for kubectl commands and aliases.
Themes I use is Powerlevel10k. To set the theme, open your ~/.zshrc file and set the ZSH_THEME variable to powerlevel10k/powerlevel10k:
ZSH_THEME="powerlevel10k/powerlevel10k"ZSH_THEME="powerlevel10k/powerlevel10k"tree
brew install treebrew install treeack
ack is a tool like grep, optimized for programmers.
brew install ackbrew install ackUsage of ack
ack [OPTION]... PATTERN [FILES OR DIRECTORIES]ack [OPTION]... PATTERN [FILES OR DIRECTORIES]Git
brew install gitbrew install gitSet up your Git username and email:
git config --global user.name "Your Name"
git config --global user.email "git config --global user.name "Your Name"
git config --global user.email "SSH config for GitHub
From original GitHub Docs
generate a new SSH key:
ssh-keygen -t ed25519 -C "your_email@example.com"ssh-keygen -t ed25519 -C "your_email@example.com"Add your SSH key to the ssh-agent:
eval "$(ssh-agent -s)"eval "$(ssh-agent -s)"Modify your ~/.ssh/config file to automatically load keys into the ssh-agent and store passphrases in your keychain:
Host *
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/id_ed25519Host *
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/id_ed25519To add your SSH private key to the ssh-agent and store your passphrase in the keychain:
ssh-add -K ~/.ssh/id_ed25519ssh-add -K ~/.ssh/id_ed25519Add your SSH key to your account:
Copy by using pbcopy and paste it to your GitHub account settings.
pbcopy < ~/.ssh/id_ed25519.pubpbcopy < ~/.ssh/id_ed25519.pubGit signed commits WIP
git config --global user.signingkey YOUR_GPG_KEY
git config --global commit.gpgsign truegit config --global user.signingkey YOUR_GPG_KEY
git config --global commit.gpgsign trueGit Ignore (Global)
curl https://raw.githubusercontent.com/github/gitignore/master/Global/macOS.gitignore -o ~/.gitignorecurl https://raw.githubusercontent.com/github/gitignore/master/Global/macOS.gitignore -o ~/.gitignoreThen set the global gitignore file:
git config --global core.excludesfile ~/.gitignoregit config --global core.excludesfile ~/.gitignoreGenerate gitignore
Visit gitignore.io and fill it with your needs.
Visual Studio Code
Visual Studio Code is a source-code editor developed by Microsoft for Windows, Linux, and macOS. Editor support for many languages trough extensions.
brew install --cask visual-studio-codebrew install --cask visual-studio-code