-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Command restructure #124
Comments
I would prefer the nested form and not the flattend one. Makes tab completion easier. Also short hand aliases are not much effort to put in and is so nice. Transaction=tx like you suggested is good. |
Are you familiar with how kubectl work here? I would look there for inspiration. |
Yep, I did. I think with tab completions it makes sense to not shorten it as new subcommands might be added which would break the structure down the line |
Update on restructuring. InitInitialization shouldn't be part of However, this opens few more questions. As
This Maybe aliases commands could even be separated in help section so it could look like:
|
Looks great to me :) |
@sideninja I really like this proposed structure now that I'm seeing it written down. The |
I am using like this long time (just copy pasted default generator code from (https://github.com/spf13/cobra/blob/master/shell_completions.md), so I have some comments. Variables are not showing up (ex: flow accounts get address), I think can be related to making it required parameter maybe, I didn't have much time to check. Also some global flags should not show I guess (for example: --network on flow keys generate) |
Commands could be restructured and improved.
Commands should also be autocompleted to avoid typing every time. Cobra has a good support for this https://github.com/spf13/cobra#generating-shell-completions
Possible command restructure for CLI:
Accounts
Nothing really changes here.
Contracts
A new section which I think makes sense because contract is a concept expected from other blockchains to be separated from accounts and I think if we put it in the first level command it will be more visible to users how to deploy contract (I saw this question 2 times already - how to deploy a contract - oh it's under accounts).
Transactions
Nothing really changes here.
Maybe provide a short option for transactions to be
tx
, although this will also be improved with autocompletions.possible shorthand:
Keys
Nothing really changes here.
Project
Adding project manipulation methods. I strongly believe this is a must. Also Bjartek said mulitple times and opened a PR on add contract but this goes further, we should allow adding all resources to the config via command.
There should also be a guided prompt way to add resources, let me give an example:
Top Level Commands
Maybe we can flatten commands that have only 1 subcommand either in the following format:
or maybe with the following format - where singular verb is actual top level command
The text was updated successfully, but these errors were encountered: