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
  • Computer name

Apps

Firstly:

Then:

Command line

  • Install Homebrew
  • brew install fish and follow instructions
  • brew install mosh

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 cask install font-hack-nerd-font

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!)
  • brew install thefuck and omf install thefuck, the magnificent app to correct your previous console commands.

Apple development

Setting up Ruby:

  • brew install rbenv; rbenv init
  • rbenv install 2.6.6; rbenv global 2.6.6
  • 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 carthage
  • brew install swiftlint
  • gem install xcpretty

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

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.