notes

evergreen

Aesthetic Command Lines with Hyper, Spaceship, and Oh My Zsh

My fairly banal, basic, but beautiful command line setup

After a recent accident with a pressurised water bottle on an airplane, I had to hard reset my Macbook. Or rather, the kind folks at the Apple Support desk reset it for me, after replacing the water-logged screen and logic board.

Not a big deal, but it meant I had to go through setting up my local development environment from scratch. I've done this enough times that I have a checklist of things I usually run through. Most of these are boring; git, github, homebrew, node, yarn, python, etc.

The fun part is making the command line itself beautiful. I spend enough time in it that it matters whether it looks and feels right to me. I've settled on a combination of the terminal, the prompt, and for small conveniences. Here's what it looks like:

Compared to most developers, this is a pretty minimal set of customisations, but it's enough for me; it's clean, minimal, and readable. I primarily use Hyper to handle the styling and colours. When you install Hyper, it'll automatically create a .hyper.js config file for you in your root directory. This is where you can tweak fonts, spacing, themes, and add plugins. You can open it in your standard code editor (VS Code, or whatever) by typing code ~/.hyper.js in the command line. Here's my full if you want to see what I've customised.

The theme I use is and the typeface is , both of which are free. You can browse plenty of other themes and plugins on the repository.

I also use the Hyper plugin which adds a small bar to the bottom of the window with quicklinks to the working directory, the git commit hash, and number of dirty (uncommited) files. Clicking the former opens the directory in Finder, and the latter opens the commit on Github.

doesn't add much to the aesthetics here, but has and makes installing Spaceship easy (described below). But I particularly like the plugin which autosuggests commands and files based on your previous behaviour.

is what makes the prompt beautiful and shows me useful information like my current working directory, git branch, whether I have unstaged changes, and process run times. I just use their default prompt, but they offer an exessive number of configuration options.

Assuming you're using either Zsh or Oh My Zsh, you can set it via your /.zshrc file. You first need to clone the Github repo and symlink it, then set ZSH_THEME="spaceship" in the zshrc config file; instructions are on the .

That's it. Nothing crazy complicated. Just a slightly nicer feeling command line experience.

Want to share?

Mentions around the web

Accidental theme: terminal colors. What happens to “.io” TLD after UK gives back the Chagos Islands? (via) Aesthetic Command Lines. Terminal colours are tricky. (via) TerminalTinder. (via) Wulfwald Bundle of Holding. OD&D compatible and Anglo-Saxon themed. awktober, and 30 day