From 778bef5ee6941056e06326d1eaaa6956d7307a85 Mon Sep 17 00:00:00 2001 From: Clawd Date: Sat, 18 Apr 2026 14:40:17 -0700 Subject: Remove Go implementation — ship is skills-only now MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The skills/ directory fully replaces the old Go CLI. Drop all Go source, build files, planning docs, and the stale SECURITY.md (which described the old git-user push-deploy model that no longer exists). Trim .gitignore to match the new tree. --- cmd/ship/root.go | 98 -------------------------------------------------------- 1 file changed, 98 deletions(-) delete mode 100644 cmd/ship/root.go (limited to 'cmd/ship/root.go') diff --git a/cmd/ship/root.go b/cmd/ship/root.go deleted file mode 100644 index aa81d1e..0000000 --- a/cmd/ship/root.go +++ /dev/null @@ -1,98 +0,0 @@ -package main - -import ( - "os" - - "github.com/bdw/ship/internal/output" - "github.com/spf13/cobra" -) - -var hostFlag string - -// This file defines the v2 CLI structure. -// The primary command is: ship [PATH] [FLAGS] -// All output is JSON by default. - -var rootV2Cmd = &cobra.Command{ - Use: "ship [PATH]", - Short: "Deploy code to a VPS. JSON output for agents.", - Long: `Ship deploys code to a VPS. Point it at a directory or binary, get a URL back. - - ship ./myproject # auto-detect and deploy - ship ./site --name docs # deploy with specific name - ship ./api --health /healthz # deploy with health check - ship ./preview --ttl 24h # deploy with auto-expiry - -All output is JSON. Use --pretty for human-readable output.`, - Args: cobra.MaximumNArgs(1), - RunE: runDeployV2, - SilenceUsage: true, - SilenceErrors: true, - DisableAutoGenTag: true, -} - -func initV2() { - // Global flags - rootV2Cmd.PersistentFlags().StringVar(&hostFlag, "host", "", "VPS host (SSH config alias or user@host)") - rootV2Cmd.PersistentFlags().BoolVar(&output.Pretty, "pretty", false, "Human-readable output") - - // Deploy flags - rootV2Cmd.Flags().String("name", "", "Deploy name (becomes subdomain)") - rootV2Cmd.Flags().String("domain", "", "Custom domain for deployment") - rootV2Cmd.Flags().String("health", "", "Health check endpoint (e.g., /healthz)") - rootV2Cmd.Flags().String("ttl", "", "Auto-delete after duration (e.g., 1h, 7d)") - rootV2Cmd.Flags().StringArray("env", nil, "Environment variable (KEY=VALUE)") - rootV2Cmd.Flags().String("env-file", "", "Path to .env file") - rootV2Cmd.Flags().Int("container-port", 80, "Port the container listens on (Docker only)") - - // Check for SHIP_PRETTY env var - if os.Getenv("SHIP_PRETTY") == "1" { - output.Pretty = true - } - - // Add subcommands - rootV2Cmd.AddCommand(listV2Cmd) - rootV2Cmd.AddCommand(statusV2Cmd) - rootV2Cmd.AddCommand(logsV2Cmd) - rootV2Cmd.AddCommand(removeV2Cmd) - rootV2Cmd.AddCommand(hostV2Cmd) - - // Initialize host subcommands (from host_v2.go) - initHostV2() -} - -func runDeployV2(cmd *cobra.Command, args []string) error { - path := "." - if len(args) > 0 { - path = args[0] - } - - opts := deployV2Options{ - Host: hostFlag, - Pretty: output.Pretty, - } - - // Get flag values - opts.Name, _ = cmd.Flags().GetString("name") - opts.Domain, _ = cmd.Flags().GetString("domain") - opts.Health, _ = cmd.Flags().GetString("health") - opts.TTL, _ = cmd.Flags().GetString("ttl") - opts.Env, _ = cmd.Flags().GetStringArray("env") - opts.EnvFile, _ = cmd.Flags().GetString("env-file") - opts.ContainerPort, _ = cmd.Flags().GetInt("container-port") - - // deployV2 handles all output and exits - deployV2(path, opts) - - // Should not reach here (deployV2 calls os.Exit) - return nil -} - -// Subcommands (list, status, logs, remove) are defined in commands_v2.go - -var hostV2Cmd = &cobra.Command{ - Use: "host", - Short: "Manage VPS host", -} - -// hostInitV2Cmd, hostStatusV2Cmd, and initHostV2() are defined in host_v2.go -- cgit v1.2.3