Mark Hurrell.

Command Line Interface Guidelines

2020  2020

while Ben and Andreas were building Replicate they looked around for advice on best practice for designing command-line interactions. In contrast to best practice advice for more visible interfaces – which have had extensive books, articles and principles since Apple’s Human Interface Guidelines in 1987 – they couldn’t find much about CLIs. So after finding a few other people who were thinking about this area, Ben, Eva, Aanand and Carl wrote a guide for designing command-line interfaces.

It evolved into a very long web page. On one of our zoom calls about Replicate Ben mentioned it and asked if I wanted to get involved. Having done a little work with non-graphical interfaces at GDS I think they’re both really interesting and relatively undocumented, obviously I said yes.

The site is built with Hugo, due to the long, text-heavy nature of the page I optimised it for readability across different device sizes. Most of the design complexity comes from a stack of CSS font-size rules optimising the typography for differing screen dimensions. We took an aesthetic lead from traditional unix man pages, while in dark mode the pages takes on more of a terminal flavour. Despite the guidelines themselves being pretty monochrome and stark, I threw together a more colourful social media card to help the link stand out on the timeline.

We ended up shipping The Command Line Interface Guidelines pretty unceremonially on a Friday evening after someone stumbled on the preview version out in the wild and tweeted about it. To all our surprise it got fifteen-thousand views in the first few hours, and spent three days on the front page of Hacker News!


With Ben Firshman, Eva Parish, Aanand Prasad and Carl Tashian.

Selected projects