Files
hanzoai_agent/control-plane/internal/cli/version.go
zeekay 2899aeaa9f feat: merge agents control plane + SDKs into unified agent repo
Consolidate all Hanzo agent infrastructure into one repo:
- control-plane/: Go control plane server (was agents-new)
- sdk/: Go, Python, TypeScript SDKs
- deployments/: Docker, Kubernetes, Helm configs
- Dockerfile.sdk: Python SDK image (ghcr.io/hanzoai/agent:latest)
- CI builds both SDK + control-plane images

No more agentfield — everything is hanzoai/agent.
2026-02-13 12:24:31 -08:00

35 lines
916 B
Go

package cli
import (
"fmt"
"runtime"
"github.com/spf13/cobra"
)
// VersionInfo holds build-time version information
type VersionInfo struct {
Version string
Commit string
Date string
}
// NewVersionCommand creates the version command
func NewVersionCommand(versionInfo VersionInfo) *cobra.Command {
versionCmd := &cobra.Command{
Use: "version",
Short: "Print version information",
Long: `Display the version, build date, commit hash, and runtime information for HanzoAgents.`,
Run: func(cmd *cobra.Command, args []string) {
fmt.Printf("HanzoAgents Control Plane\n")
fmt.Printf(" Version: %s\n", versionInfo.Version)
fmt.Printf(" Commit: %s\n", versionInfo.Commit)
fmt.Printf(" Built: %s\n", versionInfo.Date)
fmt.Printf(" Go version: %s\n", runtime.Version())
fmt.Printf(" OS/Arch: %s/%s\n", runtime.GOOS, runtime.GOARCH)
},
}
return versionCmd
}