cli/cmd/config/cmd.go
Snider bde3b27bd5
Some checks failed
Deploy / build (push) Failing after 4s
Security Scan / security (push) Successful in 13s
refactor: update import path from go-config to core/config
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-14 10:23:11 +00:00

25 lines
579 B
Go

package config
import (
"forge.lthn.ai/core/cli/pkg/cli"
"forge.lthn.ai/core/config"
)
// 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)
}
func loadConfig() (*config.Config, error) {
cfg, err := config.New()
if err != nil {
return nil, cli.Wrap(err, "failed to load config")
}
return cfg, nil
}