feat: add auto-cli customization options (#11763)
* feat(cli/v2): add command & flag proto options * WIP * docs * update * change name to use * update use * rename to autocli * updates * switch to (hopefully) more intuitive design * docs * updates * updates * add flag_options example
This commit is contained in:
+28
@@ -0,0 +1,28 @@
|
||||
tx:
|
||||
service: cosmos.bank.v1beta1.Msg
|
||||
rpc_command_options:
|
||||
- rpc_method: Send
|
||||
use: send [from_key_or_address] [to_address] [amount...]
|
||||
positional_args:
|
||||
- proto_field: from_address
|
||||
- proto_field: to_address
|
||||
- proto_field: amount
|
||||
varargs: true
|
||||
query:
|
||||
service: cosmos.bank.v1beta1.Query
|
||||
rpc_command_options:
|
||||
- rpc_method: Balance
|
||||
use: balance [address] [denom]
|
||||
positional_args:
|
||||
- proto_field: address
|
||||
- proto_field: denom
|
||||
- rpc_method: SupplyOf
|
||||
# this is a contrived example of how to customize flag options
|
||||
# we would likely prefer positional args here, but this demonstrates usage
|
||||
use: supply-of --denom [denom]
|
||||
flag_options:
|
||||
# flag_options is a map of proto field names to customization options
|
||||
denom:
|
||||
shorthand: d
|
||||
usage: the denom to query
|
||||
|
||||
Reference in New Issue
Block a user