Skip to content


Reasonable defaults, easy overrides

Optimize for what most people will need to do most of the time, but make it easy for people to adjust it to their needs. Often this means considering the default behavior of each command, and how it might need to be adjusted with flags.

Make it feel like GitHub

Using this tool, it should be obvious that it’s GitHub and not anything else. Use details that are specific to GitHub, such as language or color. When designing output, reflect the interface as much as possible and appropriate.


Use language accurate to


Don't use language that doesn't use


Use sentence case


Don't use title case


Reduce cognitive load

Command line interfaces are not as visually intuitive as graphical interfaces. They have very few affordances (indicators of use), rely on memory, and are often unforgiving of mistakes. We do our best to design our commands to mitigate this.

Reducing cognitive load is necessary for making an accessible product .

Ways to reduce cognitive load

  • Include confirm steps, especially for riskier commands
  • Include headers to help set context for output
  • Ensure consistent command language to make memorizing easier
  • Ensure similar commands are visually and behaviorally parallel. * For example, any create command should behave the same
  • Anticipate what people might want to do next. * For example, we ask if you want to delete your branch after you merge.
  • Anticipate what mistakes people might make

Bias towards terminal, but make it easy to get to the browser

We want to help people stay in the terminal wherever they might want to maintain focus and reduce context switching, but when it’s necessary to jump to make it obvious, fast, and easy. Certain actions are probably better to do in a visual interface.

A prompt asking 'What's next?' with the choice 'Preview in browser' selected.

A preview in browser step helps users create issues and pull requests more smoothly.

The gh pr create command with title and body flags outputting a pull request URL.

Many commands output the relevant URL at the end.

The gh issue view command with the --web flag. The output is opening a URL in the browser.

Web flags help users jump to the browser quickly

Edit this page on GitHub
2 contributorscolebemisampinsk
Last edited by colebemis on October 5, 2020