You've already forked step-ca-cli
mirror of
https://github.com/smallstep/cli.git
synced 2026-10-24 11:19:19 +03:00
The `step ca acme eab` subcommands only emitted fixed-width column text,
making them awkward to script against (add.go even carried a standing
TODO asking for JSON output). Add a `--json` flag to each subcommand for
machine-readable output:
- add: marshals the created key (including the secret) as a JSON object
- list: collects all pages into a JSON array, bypassing $PAGER; the
secret HMAC key is omitted, matching the table's masking
- remove: emits {"provisioner","id","deleted":true} on success
The shared cliEAK struct now has exported, JSON-tagged fields, and toCLI
guards createdAt with an IsZero check (mirroring boundAt) so unset
timestamps are dropped via omitempty. Adds the first unit tests for the
package covering toCLI and the JSON contract.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>