package main import ( "fmt" "os" ) func main() { // Use v2 (agent-first JSON) interface by default // Set SHIP_V1=1 to use legacy human-formatted output if os.Getenv("SHIP_V1") == "1" { if err := rootCmd.Execute(); err != nil { fmt.Fprintf(os.Stderr, "Error: %v\n", err) os.Exit(1) } return } // v2: JSON output by default initV2() if err := rootV2Cmd.Execute(); err != nil { // Error already printed as JSON by commands os.Exit(1) } }