## Summary - Extract PHP/Laravel commands to `core/php` repo (42 files, standalone module) - Extract CI/release + SDK commands to `core/ci` repo (10 files) - Remove `internal/variants/` build tag system entirely - Move all 30 remaining command packages from `internal/cmd/` to top-level `cmd/` - Rewrite `main.go` with direct imports — no more variant selection - PHP and CI are now optional via commented import lines in main.go Co-authored-by: Claude <developers@lethean.io> Reviewed-on: #2 Co-authored-by: Charon <charon@lthn.ai> Co-committed-by: Charon <charon@lthn.ai>
35 lines
827 B
Go
35 lines
827 B
Go
package prod
|
|
|
|
import (
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var (
|
|
infraFile string
|
|
)
|
|
|
|
// Cmd is the root prod command.
|
|
var Cmd = &cobra.Command{
|
|
Use: "prod",
|
|
Short: "Production infrastructure management",
|
|
Long: `Manage the Host UK production infrastructure.
|
|
|
|
Commands:
|
|
status Show infrastructure health and connectivity
|
|
setup Phase 1: discover topology, create LB, configure DNS
|
|
dns Manage DNS records via CloudNS
|
|
lb Manage Hetzner load balancer
|
|
ssh SSH into a production host
|
|
|
|
Configuration is read from infra.yaml in the project root.`,
|
|
}
|
|
|
|
func init() {
|
|
Cmd.PersistentFlags().StringVar(&infraFile, "config", "", "Path to infra.yaml (auto-discovered if not set)")
|
|
|
|
Cmd.AddCommand(statusCmd)
|
|
Cmd.AddCommand(setupCmd)
|
|
Cmd.AddCommand(dnsCmd)
|
|
Cmd.AddCommand(lbCmd)
|
|
Cmd.AddCommand(sshCmd)
|
|
}
|