cli/main.go
Snider 7303ba6f23
Some checks failed
Deploy / build (push) Failing after 4s
Security Scan / security (push) Successful in 18s
refactor: register commands through Core framework lifecycle
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>
2026-02-21 22:08:01 +00:00

24 lines
730 B
Go

package main
import (
"forge.lthn.ai/core/cli/cmd/config"
"forge.lthn.ai/core/cli/cmd/doctor"
"forge.lthn.ai/core/cli/cmd/help"
"forge.lthn.ai/core/cli/cmd/module"
"forge.lthn.ai/core/cli/cmd/pkgcmd"
"forge.lthn.ai/core/cli/cmd/plugin"
"forge.lthn.ai/core/cli/cmd/session"
"forge.lthn.ai/core/go/pkg/cli"
)
func main() {
cli.Main(
cli.WithCommands("config", config.AddConfigCommands),
cli.WithCommands("doctor", doctor.AddDoctorCommands),
cli.WithCommands("help", help.AddHelpCommands),
cli.WithCommands("module", module.AddModuleCommands),
cli.WithCommands("pkg", pkgcmd.AddPkgCommands),
cli.WithCommands("plugin", plugin.AddPluginCommands),
cli.WithCommands("session", session.AddSessionCommands),
)
}