Merge pull request #8587 from filecoin-project/gstuart/cli-uniformity

chore: cli: Alias cli commands for uniformity
This commit is contained in:
Geoff Stuart 2022-05-04 13:21:17 -04:00 committed by GitHub
commit 27e99ff84f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 122 additions and 208 deletions

View File

@ -90,7 +90,8 @@ var ChainHeadCmd = &cli.Command{
}
var ChainGetBlock = &cli.Command{
Name: "getblock",
Name: "get-block",
Aliases: []string{"getblock"},
Usage: "Get a block and print its details",
ArgsUsage: "[blockCid]",
Flags: []cli.Flag{
@ -299,6 +300,7 @@ var ChainStatObjCmd = &cli.Command{
var ChainGetMsgCmd = &cli.Command{
Name: "getmessage",
Aliases: []string{"get-message", "get-msg"},
Usage: "Get and print a message by its cid",
ArgsUsage: "[messageCid]",
Action: func(cctx *cli.Context) error {
@ -349,6 +351,7 @@ var ChainGetMsgCmd = &cli.Command{
var ChainSetHeadCmd = &cli.Command{
Name: "sethead",
Aliases: []string{"set-head"},
Usage: "manually set the local nodes head tipset (Caution: normally only used for recovery)",
ArgsUsage: "[tipsetkey]",
Flags: []cli.Flag{

View File

@ -358,7 +358,8 @@ var NetId = &cli.Command{
}
var NetFindPeer = &cli.Command{
Name: "findpeer",
Name: "find-peer",
Aliases: []string{"findpeer"},
Usage: "Find the addresses of a given peerID",
ArgsUsage: "[peerId]",
Action: func(cctx *cli.Context) error {

View File

@ -1428,6 +1428,7 @@ func jsonReturn(code cid.Cid, method abi.MethodNum, ret []byte) (string, error)
var StateWaitMsgCmd = &cli.Command{
Name: "wait-msg",
Aliases: []string{"wait-message"},
Usage: "Wait for a message to appear on chain",
ArgsUsage: "[messageCid]",
Flags: []cli.Flag{
@ -1470,6 +1471,7 @@ var StateWaitMsgCmd = &cli.Command{
var StateSearchMsgCmd = &cli.Command{
Name: "search-msg",
Aliases: []string{"search-message"},
Usage: "Search to see whether a message has appeared on chain",
ArgsUsage: "[messageCid]",
Action: func(cctx *cli.Context) error {
@ -1727,6 +1729,7 @@ var StateCircSupplyCmd = &cli.Command{
var StateSectorCmd = &cli.Command{
Name: "sector",
Aliases: []string{"sector-info"},
Usage: "Get miner sector info",
ArgsUsage: "[minerAddress] [sectorNumber]",
Action: func(cctx *cli.Context) error {

View File

@ -51,8 +51,9 @@ var actorCmd = &cli.Command{
}
var actorSetAddrsCmd = &cli.Command{
Name: "set-addrs",
Usage: "set addresses that your miner can be publicly dialed on",
Name: "set-addresses",
Aliases: []string{"set-addrs"},
Usage: "set addresses that your miner can be publicly dialed on",
Flags: []cli.Flag{
&cli.Int64Flag{
Name: "gas-limit",

View File

@ -522,8 +522,9 @@ var provingComputeCmd = &cli.Command{
}
var provingComputeWindowPoStCmd = &cli.Command{
Name: "window-post",
Usage: "Compute WindowPoSt for a specific deadline",
Name: "windowed-post",
Aliases: []string{"window-post"},
Usage: "Compute WindowPoSt for a specific deadline",
Description: `Note: This command is intended to be used to verify PoSt compute performance.
It will not send any messages to the chain.`,
ArgsUsage: "[deadline index]",

View File

@ -14,7 +14,8 @@ import (
)
var blockmsgidCmd = &cli.Command{
Name: "blockmsgid",
Name: "block-message-id",
Aliases: []string{"blockmsgid"},
Usage: "Print a block's pubsub message ID",
ArgsUsage: "<blockCid> ...",
Action: func(cctx *cli.Context) error {

View File

@ -41,8 +41,9 @@ type keyInfoOutput struct {
}
var keyinfoCmd = &cli.Command{
Name: "keyinfo",
Usage: "work with lotus keyinfo files (wallets and libp2p host keys)",
Name: "key-info",
Aliases: []string{"keyinfo"},
Usage: "work with lotus keyinfo files (wallets and libp2p host keys)",
Description: `The subcommands of keyinfo provide helpful tools for working with keyinfo files without
having to run the lotus daemon.`,
Subcommands: []*cli.Command{

View File

@ -119,7 +119,7 @@ var minerFaultsCmd = &cli.Command{
var minerCreateCmd = &cli.Command{
Name: "create",
Usage: "sends a create miner msg",
Usage: "sends a create miner message",
ArgsUsage: "[sender] [owner] [worker] [sector size]",
Action: func(cctx *cli.Context) error {
wapi, closer, err := lcli.GetFullNodeAPI(cctx)

View File

@ -20,7 +20,8 @@ var mpoolCmd = &cli.Command{
}
var minerSelectMsgsCmd = &cli.Command{
Name: "miner-select-msgs",
Name: "miner-select-messages",
Aliases: []string{"miner-select-msgs"},
Flags: []cli.Flag{
&cli.Float64Flag{
Name: "ticket-quality",

View File

@ -22,7 +22,8 @@ import (
)
var msgCmd = &cli.Command{
Name: "msg",
Name: "message",
Aliases: []string{"msg"},
Usage: "Translate message between various formats",
ArgsUsage: "Message in any form",
Action: func(cctx *cli.Context) error {

View File

@ -16,6 +16,7 @@ import (
var infoMessageSizeSimCommand = &cli.Command{
Name: "message-size",
Aliases: []string{"msg-size"},
Description: "Output information about message size distribution",
Flags: []cli.Flag{
&cli.Int64Flag{

View File

@ -236,35 +236,24 @@ USAGE:
lotus-miner actor command [command options] [arguments...]
COMMANDS:
set-addrs set addresses that your miner can be publicly dialed on
withdraw withdraw available balance
repay-debt pay down a miner's debt
set-peer-id set the peer id of your miner
set-owner Set owner address (this command should be invoked twice, first with the old owner as the senderAddress, and then with the new owner)
control Manage control addresses
propose-change-worker Propose a worker address change
confirm-change-worker Confirm a worker address change
compact-allocated compact allocated sectors bitfield
help, h Shows a list of commands or help for one command
set-addresses, set-addrs set addresses that your miner can be publicly dialed on
withdraw withdraw available balance
repay-debt pay down a miner's debt
set-peer-id set the peer id of your miner
set-owner Set owner address (this command should be invoked twice, first with the old owner as the senderAddress, and then with the new owner)
control Manage control addresses
propose-change-worker Propose a worker address change
confirm-change-worker Confirm a worker address change
compact-allocated compact allocated sectors bitfield
help, h Shows a list of commands or help for one command
OPTIONS:
--help, -h show help (default: false)
```
### lotus-miner actor set-addrs
#### lotus-miner actor set-addresses, set-addrs
```
NAME:
lotus-miner actor set-addrs - set addresses that your miner can be publicly dialed on
USAGE:
lotus-miner actor set-addrs [command options] [arguments...]
OPTIONS:
--gas-limit value set gas limit (default: 0)
--unset unset address (default: false)
--help, -h show help (default: false)
```
### lotus-miner actor withdraw
@ -1199,22 +1188,22 @@ USAGE:
lotus-miner net command [command options] [arguments...]
COMMANDS:
peers Print peers
ping Ping peers
connect Connect to a peer
listen List listen addresses
id Get node identity
findpeer Find the addresses of a given peerID
scores Print peers' pubsub scores
reachability Print information about reachability from the internet
bandwidth Print bandwidth usage information
block Manage network connection gating rules
stat Report resource usage for a scope
limit Get or set resource limits for a scope
protect Add one or more peer IDs to the list of protected peer connections
unprotect Remove one or more peer IDs from the list of protected peer connections.
list-protected List the peer IDs with protected connection.
help, h Shows a list of commands or help for one command
peers Print peers
ping Ping peers
connect Connect to a peer
listen List listen addresses
id Get node identity
find-peer, findpeer Find the addresses of a given peerID
scores Print peers' pubsub scores
reachability Print information about reachability from the internet
bandwidth Print bandwidth usage information
block Manage network connection gating rules
stat Report resource usage for a scope
limit Get or set resource limits for a scope
protect Add one or more peer IDs to the list of protected peer connections
unprotect Remove one or more peer IDs from the list of protected peer connections.
list-protected List the peer IDs with protected connection.
help, h Shows a list of commands or help for one command
OPTIONS:
--help, -h show help (default: false)
@ -1290,17 +1279,8 @@ OPTIONS:
```
### lotus-miner net findpeer
#### lotus-miner net find-peer, findpeer
```
NAME:
lotus-miner net findpeer - Find the addresses of a given peerID
USAGE:
lotus-miner net findpeer [command options] [peerId]
OPTIONS:
--help, -h show help (default: false)
```
### lotus-miner net scores
@ -2141,29 +2121,16 @@ USAGE:
lotus-miner proving compute command [command options] [arguments...]
COMMANDS:
window-post Compute WindowPoSt for a specific deadline
help, h Shows a list of commands or help for one command
windowed-post, window-post Compute WindowPoSt for a specific deadline
help, h Shows a list of commands or help for one command
OPTIONS:
--help, -h show help (default: false)
```
#### lotus-miner proving compute window-post
##### lotus-miner proving compute windowed-post, window-post
```
NAME:
lotus-miner proving compute window-post - Compute WindowPoSt for a specific deadline
USAGE:
lotus-miner proving compute window-post [command options] [deadline index]
DESCRIPTION:
Note: This command is intended to be used to verify PoSt compute performance.
It will not send any messages to the chain.
OPTIONS:
--help, -h show help (default: false)
```
## lotus-miner storage

View File

@ -1726,30 +1726,30 @@ USAGE:
lotus state command [command options] [arguments...]
COMMANDS:
power Query network or miner power
sectors Query the sector set of a miner
active-sectors Query the active sector set of a miner
list-actors list all actors in the network
list-miners list all miners in the network
circulating-supply Get the exact current circulating supply of Filecoin
sector Get miner sector info
get-actor Print actor information
lookup Find corresponding ID address
replay Replay a particular message
sector-size Look up miners sector size
read-state View a json representation of an actors state
list-messages list messages on chain matching given criteria
compute-state Perform state computations
call Invoke a method on an actor locally
get-deal View on-chain deal info
wait-msg Wait for a message to appear on chain
search-msg Search to see whether a message has appeared on chain
miner-info Retrieve miner information
market Inspect the storage market actor
exec-trace Get the execution trace of a given message
network-version Returns the network version
miner-proving-deadline Retrieve information about a given miner's proving deadline
help, h Shows a list of commands or help for one command
power Query network or miner power
sectors Query the sector set of a miner
active-sectors Query the active sector set of a miner
list-actors list all actors in the network
list-miners list all miners in the network
circulating-supply Get the exact current circulating supply of Filecoin
sector, sector-info Get miner sector info
get-actor Print actor information
lookup Find corresponding ID address
replay Replay a particular message
sector-size Look up miners sector size
read-state View a json representation of an actors state
list-messages list messages on chain matching given criteria
compute-state Perform state computations
call Invoke a method on an actor locally
get-deal View on-chain deal info
wait-msg, wait-message Wait for a message to appear on chain
search-msg, search-message Search to see whether a message has appeared on chain
miner-info Retrieve miner information
market Inspect the storage market actor
exec-trace Get the execution trace of a given message
network-version Returns the network version
miner-proving-deadline Retrieve information about a given miner's proving deadline
help, h Shows a list of commands or help for one command
OPTIONS:
--tipset value specify tipset to call method on (pass comma separated array of cids)
@ -1837,17 +1837,8 @@ OPTIONS:
```
### lotus state sector
#### lotus state sector, sector-info
```
NAME:
lotus state sector - Get miner sector info
USAGE:
lotus state sector [command options] [minerAddress] [sectorNumber]
OPTIONS:
--help, -h show help (default: false)
```
### lotus state get-actor
@ -1985,31 +1976,12 @@ OPTIONS:
```
### lotus state wait-msg
#### lotus state wait-msg, wait-message
```
NAME:
lotus state wait-msg - Wait for a message to appear on chain
USAGE:
lotus state wait-msg [command options] [messageCid]
OPTIONS:
--timeout value (default: "10m")
--help, -h show help (default: false)
```
### lotus state search-msg
#### lotus state search-msg, search-message
```
NAME:
lotus state search-msg - Search to see whether a message has appeared on chain
USAGE:
lotus state search-msg [command options] [messageCid]
OPTIONS:
--help, -h show help (default: false)
```
### lotus state miner-info
@ -2103,24 +2075,24 @@ USAGE:
lotus chain command [command options] [arguments...]
COMMANDS:
head Print chain head
getblock Get a block and print its details
read-obj Read the raw bytes of an object
delete-obj Delete an object from the chain blockstore
stat-obj Collect size and ipld link counts for objs
getmessage Get and print a message by its cid
sethead manually set the local nodes head tipset (Caution: normally only used for recovery)
list, love View a segment of the chain
get Get chain DAG node by path
bisect bisect chain for an event
export export chain to a car file
slash-consensus Report consensus fault
gas-price Estimate gas prices
inspect-usage Inspect block space usage of a given tipset
decode decode various types
encode encode various types
disputer interact with the window post disputer
help, h Shows a list of commands or help for one command
head Print chain head
get-block, getblock Get a block and print its details
read-obj Read the raw bytes of an object
delete-obj Delete an object from the chain blockstore
stat-obj Collect size and ipld link counts for objs
getmessage, get-message, get-msg Get and print a message by its cid
sethead, set-head manually set the local nodes head tipset (Caution: normally only used for recovery)
list, love View a segment of the chain
get Get chain DAG node by path
bisect bisect chain for an event
export export chain to a car file
slash-consensus Report consensus fault
gas-price Estimate gas prices
inspect-usage Inspect block space usage of a given tipset
decode decode various types
encode encode various types
disputer interact with the window post disputer
help, h Shows a list of commands or help for one command
OPTIONS:
--help, -h show help (default: false)
@ -2140,18 +2112,8 @@ OPTIONS:
```
### lotus chain getblock
#### lotus chain get-block, getblock
```
NAME:
lotus chain getblock - Get a block and print its details
USAGE:
lotus chain getblock [command options] [blockCid]
OPTIONS:
--raw print just the raw block header (default: false)
--help, -h show help (default: false)
```
### lotus chain read-obj
@ -2204,32 +2166,12 @@ OPTIONS:
```
### lotus chain getmessage
##### lotus chain getmessage, get-message, get-msg
```
NAME:
lotus chain getmessage - Get and print a message by its cid
USAGE:
lotus chain getmessage [command options] [messageCid]
OPTIONS:
--help, -h show help (default: false)
```
### lotus chain sethead
#### lotus chain sethead, set-head
```
NAME:
lotus chain sethead - manually set the local nodes head tipset (Caution: normally only used for recovery)
USAGE:
lotus chain sethead [command options] [tipsetkey]
OPTIONS:
--genesis reset head to genesis (default: false)
--epoch value reset head to given epoch (default: 0)
--help, -h show help (default: false)
```
#### lotus chain list, love
@ -2602,22 +2544,22 @@ USAGE:
lotus net command [command options] [arguments...]
COMMANDS:
peers Print peers
ping Ping peers
connect Connect to a peer
listen List listen addresses
id Get node identity
findpeer Find the addresses of a given peerID
scores Print peers' pubsub scores
reachability Print information about reachability from the internet
bandwidth Print bandwidth usage information
block Manage network connection gating rules
stat Report resource usage for a scope
limit Get or set resource limits for a scope
protect Add one or more peer IDs to the list of protected peer connections
unprotect Remove one or more peer IDs from the list of protected peer connections.
list-protected List the peer IDs with protected connection.
help, h Shows a list of commands or help for one command
peers Print peers
ping Ping peers
connect Connect to a peer
listen List listen addresses
id Get node identity
find-peer, findpeer Find the addresses of a given peerID
scores Print peers' pubsub scores
reachability Print information about reachability from the internet
bandwidth Print bandwidth usage information
block Manage network connection gating rules
stat Report resource usage for a scope
limit Get or set resource limits for a scope
protect Add one or more peer IDs to the list of protected peer connections
unprotect Remove one or more peer IDs from the list of protected peer connections.
list-protected List the peer IDs with protected connection.
help, h Shows a list of commands or help for one command
OPTIONS:
--help, -h show help (default: false)
@ -2693,17 +2635,8 @@ OPTIONS:
```
### lotus net findpeer
#### lotus net find-peer, findpeer
```
NAME:
lotus net findpeer - Find the addresses of a given peerID
USAGE:
lotus net findpeer [command options] [peerId]
OPTIONS:
--help, -h show help (default: false)
```
### lotus net scores