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>
17 lines
706 B
Go
17 lines
706 B
Go
package lemcmd
|
|
|
|
import (
|
|
"forge.lthn.ai/core/go/pkg/cli"
|
|
"forge.lthn.ai/lthn/lem/pkg/lem"
|
|
)
|
|
|
|
func addInfraCommands(root *cli.Command) {
|
|
infraGroup := cli.NewGroup("infra", "Infrastructure commands", "InfluxDB ingestion, DuckDB queries, and distributed workers.")
|
|
|
|
infraGroup.AddCommand(passthrough("ingest", "Ingest benchmark data into InfluxDB", lem.RunIngest))
|
|
infraGroup.AddCommand(passthrough("seed-influx", "Seed InfluxDB golden_gen from DuckDB", lem.RunSeedInflux))
|
|
infraGroup.AddCommand(passthrough("query", "Run ad-hoc SQL against DuckDB", lem.RunQuery))
|
|
infraGroup.AddCommand(passthrough("worker", "Run as distributed inference worker node", lem.RunWorker))
|
|
|
|
root.AddCommand(infraGroup)
|
|
}
|