Chia-Network / chia-blockchain

Chia blockchain python implementation (full node, farmer, harvester, timelord, and wallet)
Apache License 2.0
10.82k stars 2.03k forks source link

CLI naming #12298

Open devinark opened 2 years ago

devinark commented 2 years ago

What happened?

I propose renaming chia show to chia node since half the commands are not about showing information but about interacting with the full node. Or only the commands related to doing actions on the full node could be moved to chia node, while other commands that are about showing information like chia netspace could be moved to a chia show subcommand.

Second thing, the 2 letter short options are a footgun for people used to CLI tools. The UNIX convention is for short options to be only 1 letter long so that they can be combined in one argument, but for example chia show has 3 different options -bh, -b and -h.

This might be low priority but the CLI is often the first point of contact for beginners, so reducing confusion is a good thing. I was personally confused by it.

Version

1.4.0

What platform are you using?

Linux

What ui mode are you using?

CLI

Relevant log output

No response

wallentx commented 2 years ago

I currently have https://github.com/Chia-Network/chia-blockchain/pull/10760 awaiting review that might make a little more sense of some of the things you mentioned.

As to the 2 letter short options, @altendky and I agree 😁

altendky commented 2 years ago

So I finally realized an example of a CLI that uses multi-character single-dash (hyphen?) options. find. Still, not common. And I guess technically those are in the 'expression'.

devinark commented 2 years ago

So I finally realized an example of a CLI that uses multi-character single-dash (hyphen?) options. find. Still, not common. And I guess technically those are in the 'expression'.

Aside from the fact that find is quite infamous for its bad interface, it's less confusing as all the parameters are single-dash. The problem with the chia CLI is that at first glance it does look like standard getopts behavior (until you squint and realize some of the short options have 2 letters).