lotus/cmd/lotus-shed/main.go

102 lines
1.9 KiB
Go
Raw Normal View History

2019-12-09 15:09:23 +00:00
package main
import (
"fmt"
2019-12-09 15:09:23 +00:00
"os"
logging "github.com/ipfs/go-log/v2"
"github.com/urfave/cli/v2"
2019-12-09 15:09:23 +00:00
"github.com/filecoin-project/lotus/build"
)
var log = logging.Logger("lotus-shed")
func main() {
logging.SetLogLevel("*", "INFO")
local := []*cli.Command{
2021-03-24 03:32:56 +00:00
base64Cmd,
2019-12-09 15:09:23 +00:00
base32Cmd,
base16Cmd,
2020-04-28 08:41:59 +00:00
bitFieldCmd,
2021-04-23 03:03:53 +00:00
cronWcCmd,
frozenMinersCmd,
2019-12-09 15:09:23 +00:00
keyinfoCmd,
jwtCmd,
noncefix,
bigIntParseCmd,
staterootCmd,
auditsCmd,
2020-04-02 03:27:06 +00:00
importCarCmd,
importObjectCmd,
commpToCidCmd,
2020-05-07 05:20:17 +00:00
fetchParamCmd,
2020-10-13 03:09:40 +00:00
postFindCmd,
proofsCmd,
verifRegCmd,
marketCmd,
2020-07-22 17:14:45 +00:00
miscCmd,
mpoolCmd,
genesisVerifyCmd,
2020-09-05 00:40:57 +00:00
mathCmd,
minerCmd,
mpoolStatsCmd,
exportChainCmd,
2021-01-28 02:35:28 +00:00
exportCarCmd,
consensusCmd,
storageStatsCmd,
syncCmd,
stateTreePruneCmd,
2020-09-30 13:17:29 +00:00
datastoreCmd,
ledgerCmd,
sectorsCmd,
2020-10-23 19:51:10 +00:00
msgCmd,
electionCmd,
2020-11-02 18:09:28 +00:00
rpcCmd,
2020-11-04 15:20:57 +00:00
cidCmd,
2020-12-15 17:46:34 +00:00
blockmsgidCmd,
2021-03-24 04:00:11 +00:00
signaturesCmd,
actorCmd,
minerTypesCmd,
minerMultisigsCmd,
splitstoreCmd,
2021-09-20 11:26:05 +00:00
fr32Cmd,
2019-12-09 15:09:23 +00:00
}
app := &cli.App{
Name: "lotus-shed",
Usage: "A place for all the lotus tools",
Version: build.BuildVersion,
2019-12-09 15:09:23 +00:00
Commands: local,
2020-03-07 00:46:55 +00:00
Flags: []cli.Flag{
&cli.StringFlag{
Name: "repo",
EnvVars: []string{"LOTUS_PATH"},
Hidden: true,
Value: "~/.lotus", // TODO: Consider XDG_DATA_HOME
},
&cli.StringFlag{
Name: "miner-repo",
Aliases: []string{"storagerepo"},
EnvVars: []string{"LOTUS_MINER_PATH", "LOTUS_STORAGE_PATH"},
Value: "~/.lotusminer", // TODO: Consider XDG_DATA_HOME
Usage: fmt.Sprintf("Specify miner repo path. flag storagerepo and env LOTUS_STORAGE_PATH are DEPRECATION, will REMOVE SOON"),
},
&cli.StringFlag{
Name: "log-level",
Value: "info",
},
},
Before: func(cctx *cli.Context) error {
return logging.SetLogLevel("lotus-shed", cctx.String("log-level"))
2020-03-07 00:46:55 +00:00
},
2019-12-09 15:09:23 +00:00
}
if err := app.Run(os.Args); err != nil {
log.Warnf("%+v", err)
os.Exit(1)
return
}
}