Open stockholmux opened 6 months ago
Externalized man pages for the command reference or users continuing to use web pages. This doesn't block either, but this feature would be substantially more convenient as it's right in the CLI.
We have man pages now, do we still want to do this?
The problem/use-case that the feature addresses
In
valkey-cli
, thehelp
command will give you bare-bones information about a command, but it doesn't always give you enough information to know how to use it. Right now, this means that users typically have a CLI running next to a browser window. This may not be practical in some environments (i.e. air gapped situations) nor ergonomic.Description of the feature
I would like a
valkey-cli
feature that optionally reads in the full reference information about a command. Here is what I have in mind::extended-help-path /some/full/path/
in.valkeyclirc
valkey-doc
(e.g.help set
-> reads in/some/full/path/set.md
). For most users, this would be the valkey-doc (or some artifact of valkey-doc), but it would allow flexibility to support additional user-defined commands for covering modules.For example:
Note: if a user doesn't set anything in
.valkeyclirc
, this help isn't enabled and thehelp
command works as it does today.Alternatives you've considered
Externalized man pages for the command reference or users continuing to use web pages. This doesn't block either, but this feature would be substantially more convenient as it's right in the CLI.
Additional information
I'm not sure if there is a good C library for rendering markdown to the terminal. I could also see a situation where the help files are pre-rendered down to text by some other method (like an action in
valkey-doc
) to make this a simple operation for the CLI.