27 lines
498 B
Go
27 lines
498 B
Go
package orch
|
|
|
|
import (
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
type rootOptions struct {
|
|
dbPath string
|
|
json bool
|
|
}
|
|
|
|
func NewRootCmd() *cobra.Command {
|
|
opts := &rootOptions{}
|
|
|
|
cmd := &cobra.Command{
|
|
Use: "orch",
|
|
Short: "Leader-facing scheduler and control plane",
|
|
}
|
|
|
|
cmd.PersistentFlags().StringVar(&opts.dbPath, "db", ".agents/coord.db", "SQLite database path")
|
|
cmd.PersistentFlags().BoolVar(&opts.json, "json", false, "Emit machine-readable JSON")
|
|
|
|
cmd.AddCommand(newRunCmd())
|
|
|
|
return cmd
|
|
}
|