Work

Portfolio

Contact

Prototyping our CLI developer experience (DX)

De-risking a text-based control interface.

The Challenge

Ever wondered how to design something that doesn't have a user interface?
That's the challenge we faced at Hasura when rebuilding our CLI (command-line interface).

Hasura was undergoing a major overhaul between V2 and V3.
During this transformation, we embarked on a crucial project: refactoring our CLI.
This wasn't just any tool. It was the primary way developers interacted with Hasura services. We needed to get it right.

We were deeply embedded in the developer experience of working with Hasura, and we were good at creating prototypes - so we thought, "why should this project be different than any other?" and lended a hand to our teams working on the CLI to help prototype, test, and get feedback on CLI patterns before we went to production.

Our Approach

  1. Mapping the language: We started by cataloging every noun and verb in the new system. This ensured consistency across the server, user interface, and CLI.
  2. Charting the journey: Next, we mapped out user workflows. What actions would developers take? In what order?
  3. Prototyping the text interface: Here's where it got interesting. How do you prototype a CLI? Enter Gum, a tool that let us create interactive bash scripts. It was our secret weapon in emulating the CLI's functionality.
  4. Creating "happy-paths": We developed non-interactive examples to understand command structures. Should we use positional commands or --flags?
  5. Enhancing Interactivity: We identified which commands would benefit from an interactive mode. For instance, when applying a build to a service, why not offer a list of builds to choose from?

The Results

Hasura V3 CLI Demo.

This lightweight approach allowed us to:

  • Test our CLI design before full development.
  • Dogfood our own product early and often.
  • Gather valuable feedback early in the process.

By thinking creatively, we were able to turn a text-based interface into a tangible experience, de-risking the project.

Index