mirror of
https://github.com/hanzoai/agent.git
synced 2026-09-11 21:08:51 +00:00
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.
35 lines
916 B
Go
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
|
|
}
|