Replace init() + cli.RegisterCommands() with cli.WithCommands() passed to cli.Main(). Commands now register as framework services and receive the root command during OnStartup — no global state, no blank imports. Co-Authored-By: Virgil <virgil@lethean.io>
14 lines
381 B
Go
14 lines
381 B
Go
package config
|
|
|
|
import "forge.lthn.ai/core/go/pkg/cli"
|
|
|
|
// AddConfigCommands registers the 'config' command group and all subcommands.
|
|
func AddConfigCommands(root *cli.Command) {
|
|
configCmd := cli.NewGroup("config", "Manage configuration", "")
|
|
root.AddCommand(configCmd)
|
|
|
|
addGetCommand(configCmd)
|
|
addSetCommand(configCmd)
|
|
addListCommand(configCmd)
|
|
addPathCommand(configCmd)
|
|
}
|