MCPcopy Create free account
hub / github.com/akash-network/node / NewRootCmd

Function NewRootCmd

cmd/akash/cmd/root.go:28–47  ·  view source on GitHub ↗

NewRootCmd creates a new root command for akash. It is called once in the main function.

()

Source from the content-addressed store, hash-verified

26// NewRootCmd creates a new root command for akash. It is called once in the
27// main function.
28func NewRootCmd() (*cobra.Command, sdkutil.EncodingConfig) {
29 encodingConfig := sdkutil.MakeEncodingConfig()
30 app.ModuleBasics().RegisterInterfaces(encodingConfig.InterfaceRegistry)
31
32 rootCmd := &cobra.Command{
33 Use: "akash",
34 Short: "Akash Blockchain Application",
35 Long: `Akash CLI Utility.
36
37Akash is a peer-to-peer marketplace for computing resources and
38a deployment platform for heavily distributed applications.
39Find out more at https://akash.network`,
40 SilenceUsage: true,
41 PersistentPreRunE: cli.GetPersistentPreRunE(encodingConfig, []string{"AKASH"}, cli.DefaultHome, cli.WithPreRunAppConfig(InitAppConfig())),
42 }
43
44 initRootCmd(rootCmd, encodingConfig)
45
46 return rootCmd, encodingConfig
47}
48
49// Execute executes the root command.
50func Execute(rootCmd *cobra.Command, envPrefix string) error {

Callers 1

mainFunction · 0.92

Calls 4

ModuleBasicsFunction · 0.92
InitAppConfigFunction · 0.85
initRootCmdFunction · 0.85
RegisterInterfacesMethod · 0.45

Tested by

no test coverage detected