Live data from Hacker News

12 Factor CLI Apps

medium.com

1–10 of 253 posts

Re: 12 Factor CLI Apps

#3
In regards to 7, prompts are great for teaching new users how the program should be used.

Instead of failing then spitting out --help or manpage style info, the program just ask the user enter the needed argument or flag to continue. Having more ways to learn usage is always good IMO.

Re: 12 Factor CLI Apps

#5
post #3

In regards to 7, prompts are great for teaching new users how the program should be used. Instead of failing then spitting out --help or manpage style info, the program just ask the user enter the needed argument or flag to continue. Having more ways to learn usage is always good IMO.

yep +1. A lot of times users are only ever going to run a command once. Better to ask for the right information than bailing out because it's not perfect syntax.

Re: 12 Factor CLI Apps

#9
> I would skip man pages are they just aren’t used that often anymore.

I understand that man pages might represent a minority, but I cannot express enough how wonderful it is to get the full manual of a program without interfacing with the web. Not to mention how powerful that is, since most apps have short names that are difficult to search for, but how accessible that makes the application.

Re: 12 Factor CLI Apps

#10
This is all great advice.

The one thing this does miss is distribution, which is a HUGE part of offering a great CLI app. Specifically, I'd say:

1. Make your OFFICIAL distribution channel the primary package manager on each platform (ex: on Mac, homebrew. Ubuntu, apt/snap). Beyond that, support as many as you have capacity to.

2. Also offer an official docker image which fully encapsulates the CLI tool and all of its dependencies. This can be a great way to get a CLI tool loaded into a bespoke CI environment.

Post reply on HN