[Cialug] The Complete CLI Command, According to This Guy
Adam Shannon
adamkshannon at gmail.com
Tue Oct 9 21:02:42 UTC 2018
I agree on man pages super they're super useful for working offline.
I'm not a fan of spinners, progress bars etc - They often break in various
shells (macOS bash v3, eshell, etc..)
> * flags -- don't use bare arguments
So now we're all going to be using 'cat --file secrets.txt' ?
On Tue, Oct 9, 2018 at 12:53 PM, Todd Walton <tdwalton at gmail.com> wrote:
> 12 Factor CLI Apps
> https://hn.premii.com/#/article/18172689
>
> Guy says all (not all, but all enough) CLI apps should have a certain set
> of features:
>
> * good online help system, but skip man pages
> * flags -- don't use bare arguments
> * version -- report version with --version
> * discriminates streams, sending output to stdout, messages to stderr
> * informative, verbose, error messages
> * uses tty features: spinners, progress bars, color
> * interactively prompts for values when missing, instead of just returning
> * tables for structured data output -- bonus: csv or json output
> * good performance -- just calling the command should return in 100ms–500ms
> * be open source
> * good subcommands (think git add, git checkout, etc)
> * use freedesktop specs -- use ~/.config, for example
>
> I mostly agree. If all command line programs met at least half of these
> we'd be way better off. But the whole thing seems kind of sloppy, and I
> think he stretched a bit just to meet the magic number "12" for the number
> of features. I definitely do *not* agree with skipping man pages. It drives
> me nutty when a command line program of any complexity at all fails to have
> man pages. It tells me that the author of the program doesn't know Unix
> conventions or doesn't care enough to finish the job, and so I'm going to
> have to use extra caution when running the program lest it do something
> unexpected and un-Unixy and screw things up.
>
> --
> Todd
> _______________________________________________
> Cialug mailing list
> Cialug at cialug.org
> http://cialug.org/mailman/listinfo/cialug
>
More information about the Cialug
mailing list