Repository navigation
Description
Problem or Motivation
The owner asked on 2026-11-12 that a devops command on an HTTP API take its names from the API routes (ADR 0026, #5223). Sources: cloudflare/client.py and cloudflare/cloudflare_plans.py.
| devops command | Route |
|---|---|
| `cloudflare dns list | sync |
| `cloudflare tunnel routes | sync` |
| `cloudflare access status | sync |
The pinned cloudflared uses tunnel route for DNS, IP and load-balancer routes, which is another thing than ingress configurations. -f is --format in dns list but --force in dns delete. Loki holds no usage error for this group in the 7 days to 2026-11-12.
Proposed Solution & Architectural Design
- Rename to
cloudflare dns-records list|sync|delete,cloudflare tunnel configurations get|sync,cloudflare access apps list|syncandcloudflare access apps policies list <app_id>. The parentszones/{zone_id}andaccounts/{account_id}give no word, andcfd_tunnelgivestunnel(ADR 0026). --zone-id,--account-id,--typeand--namekeep the names of the route fields.syncreads the wanted state and sends several requests, so it is a project verb.cloudflare statusstays a project verb, because it reads two routes (user/tokens/verify,zones/{zone_id}).dns-records delete --forceloses the short form-f, so-fmeans only--formatin the group.- feat(gh): gh status, label list and secret list run gh #5228 already removes
cloudflare service-status. - Add
cloudflareto the groups oftests/commands/test_api_command_names.py.
Target Subsystem
Cloudflare (devops cloudflare).
Existing Tool Considered
The Cloudflare API v4 reference gives the names. Nothing is built.
Acceptance Criteria
devops cloudflare dns-records list --dry-runprintsGET /zones/<zone_id>/dns_recordsand sends 0 requests.devops cloudflare dns listanddevops cloudflare tunnel routesexit 2.tests/commands/test_api_command_names.pypasses forcloudflare.devops docs checkpasses.
Dependencies
Merge first: #5228. Open the pull request after the pull request of #5231 merges (generated command reference, the API name test).
Source: #5223
Alternatives check of 2026-11-29: none.
Tool: none found.
Reason: Searches for OpenAPI-to-CLI naming generators and Cloudflare endpoint references returned only unrelated documentation; no open tool renames a project's own Typer commands, so nothing covers the need.
Lacks:
- Renaming cloudflare dns to dns-records with list, sync, delete
- Nesting tunnel configurations get and sync under tunnel
- Nesting access apps list, sync and policies list under apps
- Dropping the -f alias of --force in the group
- Updating the generated CLI reference and the API name test
Proposed design
Problem statement
The devops cloudflare group names commands after internal words, not the API routes. A command does not show which route it calls. -f means --format in one command and --force in another. The change renames the commands to the route words, keeps sync and status as project verbs, and drops the -f alias of --force.
Acceptance criteria
Requirement: DNS record command group
The devops cloudflare group SHALL hold the DNS record commands under dns-records as list, sync and delete.
Scenario: DNS record command list
- WHEN a test reads the commands of the
devops cloudflare dns-recordsgroup - THEN the group holds
list,syncanddelete.
Requirement: DNS record list dry run
The cloudflare dns-records list command SHALL print the GET /zones/<zone_id>/dns_records route and send no HTTP request in a dry run.
Scenario: Dry run of the DNS record list
- WHEN a test runs
devops cloudflare dns-records list --zone-id <zone_id> --dry-run - THEN the command exits 0, prints
GET /zones/<zone_id>/dns_recordsand sends 0 requests.
Requirement: Old DNS group rejected
The cloudflare group MUST reject the removed dns group with a usage error.
Scenario: Removed dns group
- WHEN a test runs
devops cloudflare dns list,devops cloudflare dns syncanddevops cloudflare dns delete - THEN each command exits 2.
Requirement: Tunnel configuration read
The cloudflare tunnel group SHALL hold configurations get for the tunnel configurations route.
Scenario: Dry run of tunnel configurations get
- WHEN a test runs
devops cloudflare tunnel configurations get --account-id <account_id> --tunnel-id <tunnel_id> --dry-run - THEN the command exits 0 and prints
GET /accounts/<account_id>/cfd_tunnel/<tunnel_id>/configurations.
Requirement: Tunnel configuration write
The cloudflare tunnel configurations sync command SHALL send a PUT request to the tunnel configurations route.
Scenario: Dry run of tunnel configurations sync
- WHEN a test runs
devops cloudflare tunnel configurations sync --account-id <account_id> --tunnel-id <tunnel_id> --dry-run - THEN the command exits 0 and prints
PUT /accounts/<account_id>/cfd_tunnel/<tunnel_id>/configurations.
Requirement: Old tunnel commands rejected
The cloudflare tunnel group MUST reject the removed routes and sync commands with a usage error.
Scenario: Removed tunnel commands
- WHEN a test runs
devops cloudflare tunnel routesanddevops cloudflare tunnel sync - THEN each command exits 2.
Requirement: Access app command group
The cloudflare access apps group SHALL hold list and sync for the access applications route.
Scenario: Access app command list
- WHEN a test reads the commands of the
devops cloudflare access appsgroup - THEN the group holds
listandsync.
Requirement: Access app list dry run
The cloudflare access apps list command SHALL print the GET /accounts/<account_id>/access/apps route in a dry run.
Scenario: Dry run of access apps list
- WHEN a test runs
devops cloudflare access apps list --account-id <account_id> --dry-run - THEN the command exits 0 and prints
GET /accounts/<account_id>/access/apps.
Requirement: Access policies nest under app
The cloudflare access apps policies list command SHALL take the app id as its argument.
Scenario: Dry run of access policies list
- WHEN a test runs
devops cloudflare access apps policies list <app_id> --account-id <account_id> --dry-run - THEN the command exits 0 and prints
GET /accounts/<account_id>/access/apps/<app_id>/policies.
Requirement: Old access commands rejected
The cloudflare access group MUST reject the removed status, sync and policies commands with a usage error.
Scenario: Removed access commands
- WHEN a test runs
devops cloudflare access status,devops cloudflare access syncanddevops cloudflare access policies - THEN each command exits 2.
Requirement: Force has no short form
The cloudflare dns-records delete command MUST keep --force with no short form, so that -f means --format only in the group.
Scenario: Short form of force
- WHEN a test reads the parameters of the
dns-records deletecommand - THEN
--forcedeclares no short form and no parameter of the command binds-f.
Requirement: Format short form
The cloudflare dns-records list command SHALL keep -f as the short form of --format.
Scenario: Short form of format
- WHEN a test reads the parameters of the
dns-records listcommand - THEN
--formatdeclares-f.
Requirement: Route field option names
The cloudflare commands SHALL keep the route field names --zone-id, --account-id, --tunnel-id, --type and --name as option names.
Scenario: Route field options
- WHEN a test reads the options of the
dns-records,tunnel configurationsandaccess appscommands - THEN the
dns-recordscommands hold--zone-id,--typeand--name, thetunnel configurationscommands hold--account-idand--tunnel-id, and theaccess appscommands hold--account-id.
Requirement: Status stays a project verb
The cloudflare group SHALL keep status as a project verb because it reads the token verify route and the zone route.
Scenario: Status in the command list
- WHEN a test reads the commands of the
devops cloudflaregroup - THEN
statusis present.
Requirement: Cloudflare command tests pass
The change SHALL keep the Cloudflare command tests passing after the rename.
Scenario: Cloudflare command tests
- WHEN a test runs
uv run pytest tests/commands/test_cloudflare_commands.py tests/commands/test_cloudflare_dry_run.py - THEN the run passes.
Requirement: Generated command reference current
The change SHALL keep docs/CLI_REFERENCE.md current with the renamed commands.
Scenario: Docs check
- WHEN a test runs
uv run devops docs check - THEN the command exits 0.
Existing Tool Considered
The alternatives check of 2026-11-19 in the issue body records verdict none and names no tool. No open, maintained tool or library covers the rename. The change renames the project's own cloudflare commands, so it builds no code of its own and has no build cost.
Key questions
- Which words name the DNS record command group?: Use
cloudflare dns-records. The route segmentdns_recordsgives the noun. A hyphen joins its words. The parentzones/{zone_id}gives no word. (best practice) [sources: src/devops_cli/cloudflare/client.py, src/devops_cli/cloudflare/dns.py]- Chosen: dns-records. The route segment
dns_recordsgives the noun, and a hyphen joins its words. - Rejected: dns. It drops the
recordsword that the route gives, so the command does not show the route. - Rejected: zones dns-records. The route parent
zones/{zone_id}is an identifier, and the body says it gives no word.
- Chosen: dns-records. The route segment
- Which command names should the tunnel configuration route use?: Use
cloudflare tunnel configurations getfor the read. Usecloudflare tunnel configurations syncfor the write. The path segmentconfigurationsgives the noun. One object givesget.syncsends several requests. (best practice) [sources: src/devops_cli/cloudflare/client.py, src/devops_cli/cloudflare/cloudflare_plans.py]- Chosen: tunnel configurations get|sync. The path segment
configurationsgives the noun, one object givesget, andsyncsends several requests. - Rejected: tunnel routes|sync.
tunnel routein the pinned cloudflared names DNS, IP and load-balancer routes, not ingress configurations. - Rejected: tunnel config get|sync. The route segment is
configurations, and the command name takes the route words.
- Chosen: tunnel configurations get|sync. The path segment
- Where do the access policy commands sit, and how does the command take the app id?: Use
cloudflare access apps policies list <app_id>. The route nestspoliciesunderapps/{app_id}.appsis the parent command. The app id is a positional argument. (best practice) [sources: src/devops_cli/cloudflare/client.py:777, src/devops_cli/commands/cloudflare.py:772]- Chosen: access apps policies list <app_id>. The route nests the policies under the app, so the parent gives the noun and the id is an argument.
- Rejected: access policies list --app-id. The flat form drops the
appsparent that the route gives.
- Does
dns-records deletekeep-ffor--force?: No.--forcekeeps its long form only.-fmeans--formatin every command of the group. (best practice) [sources: src/devops_cli/commands/cloudflare.py, tests/commands/test_cloudflare_commands.py]- Chosen: Drop the
-falias of--force.-fis--formatindns-records list, so one group would give one short form two meanings. - Rejected: Keep
-ffor--force. A wrong action follows when a user types-ffor the format and gets a forced delete.
- Chosen: Drop the
- Is
synca project verb for the DNS record, tunnel configuration and access app commands?: Yes. Eachsynccommand reads the wanted state and sends several requests. No single route verb names it. (best practice) [sources: src/devops_cli/cloudflare/cloudflare_plans.py, tests/cloudflare/test_dns.py]- Chosen: Keep
syncas a project verb. One command sends several requests, so the route verbscreateandupdatewould not name it. - Rejected: Name each command after one route verb. The command sends more than one request, so a single route verb is wrong.
- Chosen: Keep
- Does
cloudflare statusstay a project verb?: Yes. It reads theuser/tokens/verifyroute and thezones/{zone_id}route. No single route names it. (best practice) [sources: src/devops_cli/commands/cloudflare.py, src/devops_cli/cloudflare/client.py]- Chosen: Keep
status. It reports one summary from two routes, and the group keeps one project verb. - Rejected: Split it into
tokens verifyandzones get. Two route-named commands replace one summary and change what the command reports.
- Chosen: Keep
- Do the route field names stay as option names?: Yes.
--zone-id,--account-id,--tunnel-id,--typeand--namekeep the names of the route fields. (best practice) [sources: src/devops_cli/cloudflare/client.py, src/devops_cli/commands/cloudflare.py]- Chosen: Keep the route field names. The option names match the API fields and avoid a second vocabulary.
- Rejected: Shorten the option names. A short name hides which route field the option sets.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 12, 2026
Both rename commands under ADR 0026, but #5228 covers gh commands while this covers cloudflare commands.devops-cli-service commentedon Nov 17, 2026
Refine cannot set this item to Ready at 4d085f1 while the items below stay open. The next refine round looks at the item again when they close, or when a person replies in a comment or edits the body.
devops-cli-service commentedon Nov 19, 2026
The result in the alternatives block of the issue body changed. Before this check: no check. A person decides what the new result means for the item.
Searches (3)
Searches run:
Sources:
fix(roadmap): an open tracker holds back no item (#6548)
devops-cli-service commentedon Nov 21, 2026
Owner question: See Suspected block in the section Proposed design of the body.
Options
Recommendation: Decide the question: only a person can answer it.
Evidence
devops-cli-service commentedon Nov 26, 2026
Owner question: See Suspected block in the section Proposed design of the body.
Options
Recommendation: Decide the question: only a person can answer it.
Evidence
devops-cli-service commentedon Nov 26, 2026
Next step: the stage job writes the plan of the item. See Moved to new items in the section Proposed design of the body.