Command Line Interface Guidelines

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • cli-guidelines

    A guide to help you write better command-line programs, taking traditional UNIX principles and updating them for the modern day.

  • Seems they took a small step back from their previous "don't bother with man pages" stance. Now it's "Consider providing man pages."

    I still find it a rather shocking order of priority, honestly.

    https://clig.dev/#documentation

  • cobra

    A Commander for modern Go CLI interactions

  • We recently chose cobra[1] to create a cli application. It comes with so many best practices already packaged like autocompletions, help texts etc. etc.

    [1]: https://github.com/spf13/cobra

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • try

    Inspect a command's effects before modifying your live system

  • "try" is not a prefix (like watch, nice, etc) uses an overlayfs in order to be able to see and accept or reject changes to your filesystem from a command

    https://github.com/binpash/try

  • pass-import

    A pass extension for importing data from most existing password managers

  • That way you can delegate the password handling to another program, e.g. a password manager like pass(1) (https://www.passwordstore.org/) or some interactive graphical prompt.

  • prettier

    Prettier is an opinionated code formatter.

  • Exactly. This is implemented by the Javascript code formatter Prettier [1] where you have to pass `--write` in order to overwrite an unformatted file.

    [1]: https://prettier.io

  • finstem

    Simple Finnish stem word finder

  • I know it goes without saying for most of us here, but actually being a heavy terminal user yourself is one of the most important things to understand how to design CLIs. It helps a ton to understand the ecosystem you live in, not just your own organism.

    Example: Something I did a few months back ago for a tiny personal project @ https://github.com/hiAndrewQuinn/finstem was implement `--format CSV`, `TSV` and `JSON` flags. I haven't had need for any of these myself, but they exist so any future people who want to use `csvkit`, `awk` and `jq` respectively to wrap around my program have easy ways to do so. That's not stuff I would have had the instincts to do if I wasn't myself a user of all 3 of those programs.

  • statifier

    Tool for creating portable self-containing Linux executable

  • Yeah, I wish this kind of thing[0] were a core POSIX tool which worked reliably on all systems and binaries. Bit of an oversight, that.

    [0]: https://github.com/greenpau/statifier

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts