01 · The context
Cartograph is a mid-stage startup building observability tooling for data teams. By the time we were introduced, their internal tooling had grown into eleven separate scripts, half of them only one engineer could reliably run. New hires lost a full week figuring out how to release a patch.
The goal wasn't cleverness. It was to make the common paths boring: release, rollback, hotfix, smoke-test, generate fixtures. If a junior engineer couldn't do each in one command on their first day, we hadn't finished.
02 · The approach
We started by cataloguing every invocation of every existing script over the prior 90 days. That gave us the minimum viable surface. From there, we designed the CLI around three principles: every command is idempotent, every command prints a plan before it acts, and every command has a --dry-run that exits 0 when things look fine.
Cobra was the obvious Go choice. What we built around it was the interesting part: a retry budget, a structured error surface, and a "what would happen" planner shared across commands. That code later became resilient-cli.
03 · The architecture
The CLI is a single statically-linked Go binary, distributed via a self-update channel that's gated on a short-lived token from Cartograph's SSO. Each subcommand is its own package with its own tests. A shared planctx ties plan-then-apply across the lot.
Every run writes a structured audit record to the team's datastore. Six months in, those records became the input to a small dashboard that shows which commands get used, which fail most often, and which are overdue for love.
04 · The outcome
We shipped v1.0 in week ten, with eleven legacy scripts removed and a deprecation schedule agreed with the team. Six months later, the binary is still the primary interface every engineer uses to ship — and the commit log has fewer than forty changes on it. That's the sign we built something durable.
Along the way, we extracted the retry and planning primitives into resilient-cli, now used by a handful of other teams we've never met. That's how open source should work.