cardinal 2.0 — the Cobra CLI migration

The hand-rolled command dispatcher is replaced with Cobra, adding global flags and shell completion.

cardinal 2.0 modernizes the command line. The hand-rolled flag parser in

cmd/root.go is replaced with spf13/cobra + pflag, preserving every

existing invocation — 52 commands plus 7 backup subcommands — behind thin

wrappers.

What users get:

  • Global flags everywhere--log-level debug|info|warn|error, --json,

and --quiet work on every subcommand.

  • Shell completioncardinal completion generates scripts for bash,

zsh, fish, and powershell.

  • Actionable errors — unknown flags and wrong arity now surface a real

message instead of a blank line and exit code 1.

The migration also tightened the surrounding tooling: an upgraded CI pipeline,

expanded SECURITY.md, and removed 398 lines of dead FTP code.