MCPcopy Create free account
hub / github.com/InferCore/InferCore / rootCmd

Function rootCmd

cmd/infercore/main.go:37–54  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

35}
36
37func rootCmd() *cobra.Command {
38 var cfgPath string
39 root := &cobra.Command{
40 Use: "infercore",
41 Short: "InferCore AI request control plane",
42 Long: `InferCore is an open-source AI inference control plane (routing, policy, RAG orchestration, reliability).
43
44Project website: https://infercore.dev`,
45 }
46 root.PersistentFlags().StringVar(&cfgPath, "config", envOr("INFERCORE_CONFIG", "configs/infercore.example.yaml"), "path to YAML config")
47
48 root.AddCommand(serveCmd(&cfgPath))
49 root.AddCommand(traceCmd(&cfgPath))
50 root.AddCommand(replayCmd(&cfgPath))
51 root.AddCommand(ledgerCmd(&cfgPath))
52 root.AddCommand(evalCmd())
53 return root
54}
55
56func envOr(key, def string) string {
57 if v := strings.TrimSpace(os.Getenv(key)); v != "" {

Callers 1

mainFunction · 0.85

Calls 6

envOrFunction · 0.85
serveCmdFunction · 0.85
traceCmdFunction · 0.85
replayCmdFunction · 0.85
ledgerCmdFunction · 0.85
evalCmdFunction · 0.85

Tested by

no test coverage detected