Adds passthrough() helper with DisableFlagParsing=true so commands that do their own flag.FlagSet parsing receive flags directly. Without this, cobra rejects unknown flags like --model. Also runs go mod tidy — core/go transitively pulls in cobra and charmbracelet dependencies. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
16 lines
610 B
Go
16 lines
610 B
Go
package lemcmd
|
|
|
|
import (
|
|
"forge.lthn.ai/core/go/pkg/cli"
|
|
"forge.lthn.ai/lthn/lem/pkg/lem"
|
|
)
|
|
|
|
func addGenCommands(root *cli.Command) {
|
|
genGroup := cli.NewGroup("gen", "Generation commands", "Distill, expand, and generate training data.")
|
|
|
|
genGroup.AddCommand(passthrough("distill", "Native Metal distillation (go-mlx + grammar scoring)", lem.RunDistill))
|
|
genGroup.AddCommand(passthrough("expand", "Generate expansion responses via trained LEM model", lem.RunExpand))
|
|
genGroup.AddCommand(passthrough("conv", "Generate conversational training data (calm phase)", lem.RunConv))
|
|
|
|
root.AddCommand(genGroup)
|
|
}
|