Skip to content

Add an account command to the CLI #1238

Closed

Description

@shibayan

Background

Part of #1152. Depends on the GET /api/account endpoint.

Publishing a _validation-persist TXT record is the operator's responsibility, and much of that work happens from DNS change management or IaC pipelines rather than from a browser. The CLI needs to expose the same account URI and issuer domain names as the dashboard so the values can be scripted rather than copied by hand.

Scope

Add an account command following the existing <noun> <verb> convention:

acmebot account show [options]
  • src/Acmebot.Cli/CliApplication.cs: add "account" to the command switch and a RunAccountCommandAsync
  • src/Acmebot.Cli/AcmebotApiClient.cs: add GetAccountAsync() calling api/account
  • src/Acmebot.Cli/Models.cs: add AccountItem, mirroring the server model
  • src/Acmebot.Cli/OutputFormatter.cs: add WriteAccountAsync supporting both output formats
  • src/Acmebot.Cli/HelpText.cs: add the usage line
  • docs/reference/cli.md: document the command

No new options are required — the command takes only the global options, so CliOptionNames is unchanged.

Output

--format json returns the endpoint response unchanged, so it can be consumed with jq in a provisioning script.

--format table (the default) prints the fields in a readable form, with caaIdentities flattened onto one line. config show is the closest existing precedent for rendering a single object.

Acceptance Criteria

  • acmebot account show prints the account URI, directory URL, and CAA identities
  • --format json emits the response verbatim
  • --help lists the command
  • An unknown subcommand fails with the same error shape as the other commands
  • Tests cover the command dispatch, the API client call, and both output formats
  • The command is documented in the CLI reference
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: cliCLI commands, output, configuration, and API client

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions