Say hi: piyushsatti@gmail.com

blog

Putting my terminal setup in a repo I can apply on any machine

MIT's Missing Semester convinced me to keep my dotfiles in version control. This is the repo, how it installs, and what it doesn't cover yet.

Published Author: Piyush Satti
Tooling

MIT's Missing Semester convinced me to keep my dotfiles in version control. This is the repo, how it installs, and what it doesn't cover yet.

The Missing Semester of Your CS Education is an MIT course about the tools around coding: the shell, editors, version control, debugging and data wrangling. Its dotfiles lecture stuck with me. Keep your configuration in version control and treat the repo like a lab notebook, so every tweak has a commit that says why.

My terminal setup was a pile of aliases I had copied from strangers. I wanted it in a repo that any of my machines could apply.

What’s in the repo

It’s piyushsatti/dotfiles, managed with chezmoi, for macOS and Ubuntu. The bash files are templated per operating system, and there is a zsh setup for macOS. The prompt is starship. History search uses fzf, so Ctrl+R finds old commands without me retyping them.

tmux has its own prefix key (Ctrl+Space), a Catppuccin Mocha theme, and plugins that save and restore sessions automatically, so a reboot doesn’t wipe my layout. Alacritty’s config is split into small files for theme, font, padding and link hints. On Linux there is a zellij config as well.

Installing it on a new machine

chezmoi init piyushsatti
chezmoi diff
chezmoi apply

chezmoi diff shows what would change before anything does. After the first apply I start tmux and press the prefix and I once to install the plugins, because a run-once script has already cloned the plugin manager.

Anything specific to one machine stays out of the repo. The shell files read ~/.bashrc.local, ~/.bash_profile.local, ~/.bash_aliases.local and ~/.zshrc.local if they exist, and chezmoi never manages those.

What it doesn’t cover yet

Only terminal configuration is in there. My editor setup isn’t in the repo, so a fresh machine still needs that by hand.

What I took from the course

You can program the shell as well as type into it. A config that lives in a repo gets reviewed, rolled back and reused, and a pile of copied aliases never did. If you’re picking one lecture to start with, start with that one.