0xPolygonMiden / miden-client

Client library that facilitates interaction with the Miden rollup
MIT License
25 stars 22 forks source link

refactor: git-like usage commands #338

Closed tomyrd closed 1 month ago

tomyrd commented 1 month ago

closes #333

The previous command structure was tree-like with sub-commands hidden inside other sub-commands. This PR looks to change the structure to be more git-like with a lot of top level commands with flags that modify their functionality.

Some screenshots provided by @mFragaBA: image image image image image image image image

igamigo commented 1 month ago

Looks good so far! I am personally not sure if I prefer the flatter structure versus the more subcommand-based one. It seems a bit more usable/cleaner at first sight, but also it showcases the types of entities that are involved a little less. But in any case, here are some notes of what I reviewed so far if we decide to go this route:

bobbinth commented 1 month ago

It seems a bit more usable/cleaner at first sight, but also it showcases the types of entities that are involved a little less.

Agreed - but I think we can showcase the entities via the client library interface and CLI could still be a bit more "customized" to make it more user friendly.

I'd change --acc-type to --type in the new-account command, since it feels a bit redundant.

As I mentioned in https://github.com/0xPolygonMiden/miden-client/issues/333#issuecomment-2106055289, I'd probably split this into two commands new-wallet and new-faucet. This way, both commands would be simpler (in terms of options to chose from).