This is how I set up my Macs, including those that I use remotely, e.g., for running CI. This focussed on the common apps without which I feel lost, how I configure my Terminal.app using Fish shell, and the different tools for Apple development.

Settings

  • Language: English
  • Trackpad: Tap to click (under Trackpad) and three-finger drag (under Accessibility > Pointer Control)
  • Computer name

Apps

Firstly:

Then:

Command line

  • Install Homebrew
  • brew install fish and follow instructions

Connecting the above apps:

  • Install smerge to launch Sublime Merge: ln -s /Applications/Sublime\ Merge.app/Contents/SharedSupport/bin/smerge /usr/local/bin/
  • Install code to launch VSCode. Launch VSCode, hit ⇧⌘P, then select “Shell command: install ‘code’”

Fish Shell

Make sure, VSCode (or Sublime Text) is installed, for easy modifying of any configuration.

Font

I like using Nerd Fonts, which add a bunch of glyphs that are useful for coding. Install as follows:

brew tap homebrew/cask-fonts
brew install font-hack-nerd-font --cask

Themes and plugins

  • Get OMF for installing Fish plug-ins and themes
  • omf install bobthefish as a nice themes (if it looks broken, remember to pick Fira as your font!)

Apple development

Setting up Ruby:

  • brew install rbenv; rbenv init and follow instructions
  • rbenv install 3.0.0; rbenv global 3.0.0
  • First run bash to switch from fish to bash, and then run rbenv init so that ruby will be consistent across bash and fish.
  • gem install bundler

Other tools:

  • brew install swiftlint
  • brew install xcbeautify

Generating documentation:

  • gem install jazzy
  • brew install python3; pip3 install mkdocs; pip3 install pymdown-extensions

GitLab CI (optional)

Copy over SSH keys over for passwordless login:

  • cat .ssh/id_rsa.pub | ssh [user]@[host] 'cat >> .ssh/authorized_keys'

Setting up CI runner:

  • Follow docs
  • executor: shell
  • If it fails at first: unregister, register again
  • Add SSH key
  • If the SSH key uses a passphrase, also run ssh-add -K ~/.ssh/id_rsa to save the passphrase to the keychain.

Then for iOS:

  • Run fastlane match_development or similar in the relevant projects to get the right signing information, or open Xcode project files and tick the various “Automatic signing” prompts.
  • If CI is using a non-admin users, you’re using fastlane via Homebrew and plug-ins, you should also grant access to write (those plugins) to its directory: chmod -R a+w /usr/local/Cellar/fastlane