is there a way to make CLI "more discoverable"
I've thought about this a lot. The answer, I think, is to have a "reverse index" of tasks that you can do with the tool and their corresponding commands or recipes.
For example, man pages are typically organized alphabetically by option or subcommand. I'm envisioning a section of documentation - maybe a separate man page or just something on a website - that looks like this (e.g. for rsync):
I want to ...
Transfer files within the local filesystem
rsync dir1/ dir2
Transfer files within the local filesystem & create a new directory
rsync dir1 dir2 # Note the lack of trailing slash on dir1
Preserve access times
Use -t/--times
Recurse into directories
Use -r/--recursive
< etc >
You can construct a lot of interesting recipes in this format. Rsync, Make, Find, Git, Docker, and many others all could benefit from this kind of treatment.Such a document would be:
- Browsable and therefore discoverable
- Easy to search with plain text (can be optimized by making sure key words are inserted in the description text)
- A useful reference if you can't remember this or that specific incantation
I use tldr[0] for that.