My MacOS Dev Setup

 MacOS Dev Setup

These are the steps I use to setup a new MacOS machine, so that it has all the stuff that I use for software development.

New Machine First Steps

Start the new machine and create an account. Make sure you have your full name and the name of the account the way you would like.

Add your Apple ID

Install Xcode

Machine Startup

Sign into Apple ID, so that you have access to the store and iCloud.

Settings

General>About>Name (set your computer name)

General>Software Update>Schedule Updates (so they run tonight)

Trackpad>Point & Click>Tap to click

Keyboard>Delay until repeat (one away from short)

Accessibility>Zoom>Use scroll gesture with modifier keys to zoom

Accessibility>Pointer Control>Trackpad Options>Use trackpad for dragging

Accessibility>Pointer Control>Trackpad Options>Dragging style>Three Finger Drag

Desktop & Dock>Click wallpaper to reveal desktop>Only in Stage Manager

Internet Accounts> Add personal and work accounts

Apple ID>iCloud>Apps Using iCloud:iCloud Drive>Sync this Mac>Turn on Desktop & Documents

Finder Settings>Sidebar>

Show these items in the sidebar:

    • Favorites
      • Add Home 
    • Locations
      • Add home
      • Add hard disks

Messages

Settings>iMessage>Enable Messages in iCloud

FileMerge

Add the built in FileMerge.app to your dock.

Terminal

Terminal>Settings>Profiles>Shell>When the shell exits:>Close if the shell exited cleanly
Create a directory for software development projects
mkdir ~/Projects

vim

To add line numbers to vi, you need to first create a .vimrc file

vi .vimrc

Then add the following line to the file

set number

1password

Install and login to 1Password so that you have access to all of your passwords.

oh my zsh

MacOS uses z shell by default. When using the terminal, I like to have a customized interface that gives me feedback on the status of my git repo, which version of python is active, which virtual environment is active, etc.
OMZ or oh my zsh is an open source project that allows for infinite customization.
oh my zsh
See my oh my zsh setup for instructions on how I set up my terminal. 

Xcode

Xcode is required for several tools. I usually just install Xcode from the app store, then open a terminal and issue the following command to install the command line tools:
xcode-select --install

Add the FileMerge.app to the dock.

Homebrew

Homebrew is the de-facto package manager for MacOS. Just follow the simple installation instruction on the website.

Git

Use homebrew to install git:
brew install git

Tcl/Tk

Tool command language/GUI Tool kit
brew install tcl-tk
Note to make sure pyenv uses this version of tcl-tk:
env \
  PATH="$(brew --prefix tcl-tk)/bin:$PATH" \
  LDFLAGS="-L$(brew --prefix tcl-tk)/lib" \
  CPPFLAGS="-I$(brew --prefix tcl-tk)/include" \
  PKG_CONFIG_PATH="$(brew --prefix tcl-tk)/lib/pkgconfig" \
  CFLAGS="-I$(brew --prefix tcl-tk)/include" \
  PYTHON_CONFIGURE_OPTS="--with-tcltk-includes='-I$(brew --prefix tcl-tk)/include' --with-tcltk-libs='-L$(brew --prefix tcl-tk)/lib -ltcl8.6 -ltk8.6'"
 
pyenv install 1.1.1

Pyenv

Pyenv allows you to install multiple versions of python. This is super useful when you need to test your code against different versions of python, or if you are working on multiple projects that all have different python versions.
Use homebrew to install pyenv:
brew install pyenv

Pipx

Pipx allows you to install python applications in isolation. So for example if you wanted to install Poetry and have it be available as an application separate from any other python environment.
Use homebrew to install pipx:
brew install pipx
note: This will also brew install python 3.12

Poetry

Poetry is a python packaging and dependency management system. It allows you to create python virtual environments.
Use pipx to install poetry:
pipx install poetry

JetBrains Toolbox App

JetBrains makes some great development tools some free, some for a price. My favorite JetBrains tools are PyCharm and DataGrip. To easily manage my tools and projects I always install the JetBrains toolbox first.
Once the JetBrains Toolbox is installed, I use the toolbox to install the other tools I need. Toolbox keeps all my apps up to date.
Download the toolbox app here: https://www.jetbrains.com/toolbox-app/

PyCharm

Use toolbox to install PyCharm Community Edition

Sublime Text

IDEs are great and all, but sometimes all you need is a good text editor. Sublime is my choice. 
Download it here: https://www.sublimetext.com/

GitHub Desktop

Install the GitHub Desktop GUI
Configuration
Settings>Integrations>External Editor>PyCharm
Settings>Git>email>work email address
GitHub Desktop>Install Command Line Tool... (this instals the github cli command see github --help)

GitHub CLI

brew install gh

Krisp


Comments