datumctl is the official CLI for Datum Cloud, a connectivity infrastructure platform. It is NOT a Kubernetes CLI — users manage Datum Cloud resources (organizations, projects, DNS zones, networking, etc.) with no Kubernetes knowledge required. k8s.io/kubectl is an internal implementation detail; the only Kubernetes-facing feature is the opt-in auth update-kubeconfig command for existing kubectl users.
Module: go.datum.net/datumctl | Go: 1.25+ | Task runner: go-task
- Never use
kubectlin examples or help text — alwaysdatumctl - Never reference Kubernetes-native resource types (pods, deployments, services, nodes) in user-facing text
- kubectl-only commands (
auth update-kubeconfig,auth whoami,auth can-i) must say "kubectl users only" upfront in their help text - Primary login is
datumctl login(top-level) — notauth login; for CI/headless use--no-browser; for staging use--hostname auth.staging.env.datum.net - Use
UserErrorfrominternal/errorsfor user-facing errors (no stack traces shown) - Prefer
--dry-run=serveranddatumctl diff -fbefore destructive write operations;deletehas no confirmation prompt - The
activitycommand comes fromgo.miloapis.com/activity— override itsLongandExampleinroot.goafter construction WrapResourceCommandapplies toget,delete,edit,describeonly;apply,create,diffsetGroupIDinline- Use
templates.LongDesc()forLongfields andtemplates.Examples()forExamplefields on Cobra commands
Custom commands (login, logout, auth subcommands, ctx, docs, mcp): add files under internal/cmd/<name>/, register the returned *cobra.Command in root.go.
kubectl-wrapped commands (get, delete, apply, create, edit, describe, diff, explain, api-resources, api-versions, version): override help text after the constructor call in root.go:
cmd := get.NewCmdGet("datumctl", factory, ioStreams)
cmd.Short = "List or retrieve Datum Cloud resources"
cmd.Long = datumGetLong
cmd.Example = datumGetExampleinternal/errors/ UserError — clean user-facing messages, no stack traces
internal/authutil/ OAuth2 PKCE, device flow, machine-account auth
internal/client/ DatumCloudFactory — org/project scope resolution + API clients
internal/discovery/ Live org/project listing and lookup
internal/picker/ Interactive TUI context/account selector
Follow the datum-platform:pr-conventions skill for all PRs, issues, and comments — including its concision rules: say it once (don't restate the summary as test-plan checkboxes, or describe the same behaviour in prose and again in a checklist), and cut every word carrying no fact. Compress, never omit — brevity must not drop facts.