↓ Skip to main content
macOS Setup for Development and Research
  1. Posts/

macOS Setup for Development and Research

··1559 words·8 mins· loading · loading · · ·
Yangyang Li
Author
Yangyang Li
PhD Candidate at Northwestern University
Table of Contents

Gallery#

TLDR
#

AlacrittyOfficeAlDenteOne Switch
AlfredPDF ExpertAltTabPicGo
BartenderPyCharmcheat.shRectangle
ChromeReeder 5CLionRust
CondaSnippetsLabDefault Folder XSoundSource
DockerSpaceVimdustTime Sink
Ferditldrfishtmux
GittmuxinatorhyperfineVim
ImagineXcodeiShotXmind
iTerm2ZellijLunarVimZoom
MagnetZoteroMambazsh
MicromambafisherMiniforgeouch
MonitorControltopgradeMonodrawImageMagick
Neovimyoutube-dlNotionJetBrains
Google DriveTransmitHomebrewtree
Fluent ReaderWezTermIINAVS Code

Why I keep this list
#

Migrating a development setup to a new machine takes a surprising amount of time, so I started documenting the whole process when I moved to a MacBook Pro with the M1 chip. This post covers the software I use every day; the configuration files themselves live in my dotfiles. It is a living document: tools I have retired stay in the list, struck through or marked as replaced, so the history of the setup is still visible.

Package manager
#

Homebrew
#

Homebrew is the package manager for macOS. Almost everything else in this post is installed through it, so it goes first.

  1. 1

    Install Homebrew

    Open Terminal (Applications → Utilities) and run the installer. It will ask for your password once to set up the required directories.

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  2. 2

    Install a package

    Homebrew resolves and installs dependencies for you.

    brew install vim
  3. 3

    Keep everything current

    brew update && brew upgrade

Terminal workspace
#

My terminal stack has changed over time:

I keep the notes on the earlier tools below for reference. The move to the current setup has its own post:

Alacritty
#

Alacritty is a fast, GPU-accelerated terminal emulator written in Rust. It runs on macOS, Linux, and Windows and deliberately does very little beyond rendering text quickly, which is exactly what I want when a multiplexer handles the rest.

brew install --cask alacritty

Configuration lives in ~/.config/alacritty/alacritty.yml, where you set the font, color scheme, and key bindings. The official documentation covers every option.

Zellij
#

Zellij is a terminal workspace: it manages panes, tabs, and sessions inside one window. It fills the same role as tmux, but its default key bindings and on-screen hints make it much friendlier to start with.

brew install zellij

Key bindings, themes, and layouts are configured in ~/.config/zellij/config.kdl.

Fish
#

Fish shell showing inline autosuggestions in Alacritty

fish, the Friendly Interactive Shell, ships with autosuggestions from your history, syntax highlighting, and sensible completions out of the box. Getting the same experience in zsh takes a stack of plugins; with fish I need almost no configuration.

brew install fish

Run fish to start a session. Configuration goes in ~/.config/fish/config.fish, and I manage plugins with fisher.

Command-line tools
#

Git
#

Git is the distributed version control system behind nearly every project I touch and the way I move code to and from GitHub. macOS ships an older Git, so I install a current one with Homebrew:

brew install git

Conda
#

Conda manages packages, dependencies, and isolated environments for any language: Python, R, C/C++, and more. It started as a Python tool, but I use it to install compiled bioinformatics software just as often.

On Apple Silicon I install Miniforge, a minimal Conda installer that defaults to the conda-forge channel and supports the arm64 architecture. For speed, I use Mamba or Micromamba as a drop-in replacement for the conda command when installing packages.

tree
#

tree prints a directory as an indented listing of files. With no arguments it lists the current directory; given paths, it lists each in turn and reports the total number of files and directories.

Output of the tree command showing a nested directory listing
tree
brew install tree

cheat.sh
#

cheat.sh is a community-maintained cheat sheet service for programming languages and command-line tools, reachable from any terminal with curl cheat.sh/<command>. It is the fastest way I know to look up a forgotten flag.

cheat.sh logo

dust
#

dust is du written in Rust. Instead of a flat list of numbers it prints a tree sorted by size, so the directories eating your disk are obvious at a glance.

brew install dust
dust output showing disk usage as a size-sorted tree

hyperfine
#

hyperfine is a command-line benchmarking tool. It runs a command repeatedly, handles warmup, and reports the mean with a confidence interval, which is far more trustworthy than a single time run.

brew install hyperfine
hyperfine comparing the run time of two commands

Run hyperfine --help for the options on run count, warmup iterations, and exporting results.

ouch
#

ouch (Obvious Unified Compression Helper) gives one interface to tar, zip, gz, xz, lzma, bz2, lz4, sz, and zst, and picks the format from the file extension. ouch decompress a.zip extracts an archive; ouch compress one.txt two.txt archive.zip creates one.

cargo install ouch

topgrade
#

topgrade upgrades everything on the machine in one command: Homebrew, Cargo, Conda, plugin managers, and more. It replaces the handful of update commands I used to run by hand.

topgrade upgrading several package managers in sequence
brew install topgrade

ImageMagick
#

ImageMagick wizard logo

ImageMagick is the command-line toolkit for converting and editing images. I use it mostly to resize and convert figures for slides and blog posts.

brew install imagemagick

The convert command takes an input file, optional operations, and an output file:

convert input.jpg -resize 800x600 output.jpg

Other useful commands are identify for image metadata, composite for layering images, and montage for contact sheets. man convert and the official documentation cover the rest, and the same functionality is exposed as a library for C, Perl, Python, and Ruby.

youtube-dl
#

youtube-dl downloads videos from YouTube and many other sites.

brew install youtube-dl

Pass it a URL and it picks the best available format and saves the file to the current directory:

youtube-dl https://www.youtube.com/watch?v=VIDEO_ID

Options cover format selection, audio-only downloads, subtitles, and whole playlists or channels; see youtube-dl --help.

Window management
#

For keyboard-driven window management I use yabai, skhd, and SketchyBar: a tiling window manager, a hotkey daemon, and a status bar that work together.

macOS desktop with tiled windows managed by yabai and a SketchyBar status bar

I describe the setup in detail in a separate post:

Install all three with Homebrew:

brew install koekeishiya/formulae/yabai
brew install koekeishiya/formulae/skhd

brew tap FelixKratz/formulae
brew install sketchybar

After installation, yabai and skhd each need a configuration file that defines the layout rules and the keyboard shortcuts. Both tools are flexible, so expect to iterate on the configuration for a while.

Tools I used before switching to yabai:

  • Magnet snaps windows to screen regions with shortcuts
  • Rectangle moves and resizes windows with keyboard shortcuts
  • AltTab brings a Windows-style window switcher to macOS

Editors
#

Each of the three editors I use has a clear strength, and the choice comes down to the task and personal preference.

Neovim
#

Neovim is a fork of Vim that modernizes the codebase, adds Lua configuration, and exposes a plugin API that has produced a huge ecosystem. It is fast, runs anywhere a terminal does, and rewards the steep learning curve with a keyboard-driven workflow. Neovim is my primary editor, and I have written a series about my personal development environment.

VS Code
#

VS Code is Microsoft’s open-source editor built on Electron. It supports nearly every language through extensions, has strong debugging features, and needs little configuration to be productive. Its main cost is resources: it is noticeably heavier than a terminal editor.

JetBrains
#

JetBrains builds full IDEs such as IntelliJ IDEA, PyCharm, and CLion. They ship with a refactoring engine, a debugger, and deep language understanding that no plugin stack quite matches, which makes them my choice for large codebases. The trade-offs are licence cost and resource usage.

In short: Neovim for speed and customization, VS Code for ease of use and breadth, JetBrains for heavyweight refactoring and debugging.

Applications
#

Everything else I install on a new Mac, with a one-line note on why. Many of these are available as Homebrew casks; my install scripts and config files are in my dotfiles on GitHub.

  • Alfred launcher, clipboard history, and workflows that replace Spotlight
  • Default Folder X adds recent and favorite folders to every open and save dialog
  • Docker isolated environments for development and deployment
  • Chrome my browser
  • IINA a modern video player for macOS
  • Imagine compresses images before I upload them anywhere; small and effective
  • Office for documents that have to be Word or PowerPoint
  • MonitorControl controls brightness and volume of external monitors from the keyboard
  • Monodraw draws ASCII diagrams
  • PDF Expert the best PDF reader I have used on a Mac
  • PicGo uploads images to hosts such as GitHub; essential for writing this blog
  • SnippetsLab my code snippet manager; integrates with Alfred
  • Xcode Apple’s IDE and developer toolchain
  • Zoom meetings
  • Xmind mind maps for organizing ideas
  • Transmit file transfer client for servers and cloud storage
  • Time Sink records how long each app is in use
  • SoundSource per-application audio control
  • Reeder 5 RSS reader
  • Notion notes and project planning
  • One Switch one-click toggles for keep awake, hide desktop icons, and similar
  • iShot screenshot and screen recording tool
  • Google Drive cloud storage and file sharing
  • Ferdi collects Gmail, Slack, and other messaging services in one window
  • Bartender hides and organizes menu bar icons
  • AlDente limits charging to keep the battery healthy
  • Zotero my reference manager for research papers
  • Fluent Reader a modern desktop RSS reader

Related