LEM/cmd/lemcmd/lem.go
Snider 094e4570ba refactor: migrate CLI imports from core/go to core/cli
All imports updated from forge.lthn.ai/core/go/pkg/cli to
forge.lthn.ai/core/cli/pkg/cli. core/cli is now a direct dependency;
core/go becomes indirect.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 23:01:41 +00:00

27 lines
809 B
Go

// Package lemcmd provides CLI commands for the LEM binary.
// Commands register through the Core framework's cli.WithCommands lifecycle.
package lemcmd
import (
"forge.lthn.ai/core/cli/pkg/cli"
)
// AddLEMCommands registers all LEM command groups on the root command.
func AddLEMCommands(root *cli.Command) {
addScoreCommands(root)
addGenCommands(root)
addDataCommands(root)
addExportCommands(root)
addMonCommands(root)
addInfraCommands(root)
}
// passthrough creates a command that passes all args (including flags) to fn.
// Used for commands that do their own flag parsing with flag.FlagSet.
func passthrough(use, short string, fn func([]string)) *cli.Command {
cmd := cli.NewRun(use, short, "", func(_ *cli.Command, args []string) {
fn(args)
})
cmd.DisableFlagParsing = true
return cmd
}