| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
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>
|
|
Sorry, something went wrong.
|
|
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Summary
Adds a --json flag for machine-readable output across the entire step ca acme eab command chain (add, list, remove). Previously these subcommands only emitted fixed-width column text, making them awkward to script against — add.go even carried a standing // TODO(hs): JSON output, so that executing this command can be more easily automated?.
What changed (command/ca/acme/eab/)
Example output
Design decisions
Testing
🤖 Generated with Claude Code