package main import ( "fmt" "os" ) var version = "0.0.1-dev" const usage = `edgeguard-ctl — EdgeGuard CLI Usage: edgeguard-ctl [args] Commands: version Print version initdb Initialise PostgreSQL database and user (idempotent) migrate up Apply pending migrations migrate down Roll back last migration (dev only) cluster-join Join an existing cluster (--from URL --token TOKEN) cluster-leave Leave the cluster cleanly promote Promote this node's PG to primary dump-config Print effective config to stdout ` func main() { if len(os.Args) < 2 { fmt.Fprint(os.Stderr, usage) os.Exit(2) } switch os.Args[1] { case "version": fmt.Println(version) case "-h", "--help", "help": fmt.Print(usage) default: fmt.Fprintf(os.Stderr, "edgeguard-ctl: command %q not yet implemented\n", os.Args[1]) os.Exit(2) } }