Skip to content

Add Cloudflare DNS record helpers to @tool #35

Description

@PerishCode

Why

sidecar is migrating repo-local support scripts into .seal wrappers. Most of its current Cloudflare support can already use runseal @tool cloudflare, but the manage-dns-* commands still need typed DNS record operations.

Without this, sidecar can only preserve parity by hand-assembling Cloudflare /dns_records API calls inside a .seal wrapper. That keeps Cloudflare API details in each repository operator instead of in runseal's atomic tool layer.

Proposed tool surface

Add typed DNS record helpers under the existing Cloudflare zone namespace:

runseal @tool cloudflare zone dns-record list --zone-id <zone-id> --name <record-name>
runseal @tool cloudflare zone dns-record create --zone-id <zone-id> --json <record-json>
runseal @tool cloudflare zone dns-record update --zone-id <zone-id> --record-id <record-id> --json <record-json>

Suggested behavior:

  • list returns the Cloudflare result array from GET /zones/{zone_id}/dns_records, filtered by --name when provided.
  • create posts the provided JSON body and returns result.
  • update patches the provided JSON body and returns result.
  • JSON validation/errors should match existing zone ruleset rule add|update behavior.

Sidecar consumer use case

Sidecar wants to implement these wrapper commands without Python:

runseal :cloudflare manage-dns-plan
runseal :cloudflare manage-dns-inspect
runseal :cloudflare manage-ensure-dns

The desired record shape is currently:

{
  "type": "CNAME",
  "name": "sidecar.perish.uk",
  "content": "releases.sidecar.perish.uk",
  "ttl": 1,
  "proxied": true
}

Non-goals

  • No task runner behavior.
  • No Cloudflare state orchestration beyond atomic API helpers.
  • No need to extend Seal syntax, wrapper discovery, or profile injection.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions