DigitalOcean DNS provider extension for npmctl.
Project description
npmctl-digitalocean
DigitalOcean DNS provider plugin for npmctl
Extend npmctl with DigitalOcean-backed DNS record management for declarative workflows, provider discovery, and DNS-aware automation.
npmctl-digitalocean is the DigitalOcean DNS provider package for npmctl. Install it when you want desired-state DNS records or DNS diagnostics to resolve through DigitalOcean instead of using only the base npmctl package.
Supported Python Versions
npmctl-digitalocean supports Python 3.10, 3.11, 3.12, 3.13, and 3.14.
Why npmctl-digitalocean
- Adds DigitalOcean DNS provider discovery to
npmctl - Lets DNS workflows live beside proxy and certificate desired state
- Keeps DigitalOcean tokens out of the core CLI package
- Supports operator diagnostics through
npmctl dns doctor - Provides client helpers for DigitalOcean DNS record workflows
FAQ
What is npmctl-digitalocean?
Answer: npmctl-digitalocean is a plugin package that teaches npmctl how to talk to the DigitalOcean Domain Records API for DNS record operations and DNS provider diagnostics.
When do I need npmctl-digitalocean?
Answer: You need npmctl-digitalocean when your npmctl workflow includes DigitalOcean-managed DNS records or when you want npmctl to validate DigitalOcean DNS connectivity and credentials.
Does npmctl-digitalocean work without npmctl?
Answer: No. npmctl-digitalocean is an extension package for npmctl, not a standalone CLI.
Can npmctl-digitalocean set DNS records?
Answer: Yes. The DigitalOcean provider supports declarative A, AAAA, CNAME, TXT, MX, SRV, and CAA writes. MX records require priority.
What credentials are required?
Answer: DigitalOcean API access requires DIGITALOCEAN_TOKEN. For diagnostics, the token needs domain read permissions. For record changes, it needs write access to target domain records.
Install
Install the base CLI and the DigitalOcean provider package together:
pipx install npmctl
pipx inject npmctl npmctl-digitalocean
npmctl plugins list
With uv:
uv tool install npmctl
uv tool install npmctl-digitalocean
npmctl plugins list
Inside a virtual environment:
python -m venv .venv
. .venv/bin/activate
python -m pip install npmctl npmctl-digitalocean
npmctl plugins list
Configure DigitalOcean
Set the required environment variable:
export DIGITALOCEAN_TOKEN=your-digitalocean-token
Optional for tests or alternate endpoints:
export DIGITALOCEAN_API_BASE_URL=https://api.digitalocean.com
Verify Plugin Discovery
Check that npmctl can discover the provider:
npmctl plugins list
npmctl dns doctor --provider digitalocean
Minimal DNS Workflow
Once the provider is installed and configured, npmctl can validate, plan, apply, or diagnose DigitalOcean-backed DNS behavior through the base CLI:
npmctl validate desired-state/dns.yaml
npmctl plan desired-state/dns.yaml --owner site-a
npmctl apply desired-state/dns.yaml --owner site-a
npmctl dns providers
npmctl dns zones --provider digitalocean
npmctl dns records --provider digitalocean --zone example.com
DigitalOcean API Surface
The provider follows the DigitalOcean Domains and Domain Records API:
GET /v2/domains: discover domains managed in the account.GET /v2/domains/{domain_name}/records: list DNS records for one domain.POST /v2/domains/{domain_name}/records: create supported DNS records.PUT /v2/domains/{domain_name}/records/{domain_record_id}: update a record.DELETE /v2/domains/{domain_name}/records/{domain_record_id}: delete a record.
Programmatic Record Operations
from npmctl_digitalocean import DigitalOceanClient, DigitalOceanConfig
client = DigitalOceanClient(DigitalOceanConfig.from_env())
record = client.create_record("example.com", type="A", name="www", value="192.0.2.10", ttl=300)
client.update_record("example.com", int(record.record_id), type="A", name="www", value="192.0.2.11", ttl=300)
client.delete_record("example.com", int(record.record_id))
CNAME and other supported record types use the same type, name, value,
and ttl shape. MX records pass priority.
Safety Notes
- DigitalOcean record
nameis relative to the zone; use@for the root where applicable. - Keep
DIGITALOCEAN_TOKENout of desired-state files and logs. - Use account and token scoping to avoid mutating foreign-owned DNS.
- Use npmctl owner metadata for desired DNS records so apply remains owner-scoped.
More Documentation
- Related PyPI package: https://pypi.org/project/npmctl/
- Repository: https://github.com/groupsum/npmctl
- DNS provider docs: https://github.com/groupsum/npmctl/tree/master/docs/dns-providers.md
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file npmctl_digitalocean-0.3.10.tar.gz.
File metadata
- Download URL: npmctl_digitalocean-0.3.10.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d13db020ca149d8513c467ef741c381d276b9bc5c57c2cd0e4828232f10b158d
|
|
| MD5 |
348fd4db0bc98c6212de659382d7adb1
|
|
| BLAKE2b-256 |
f2b271c347ae7f632eecc5719a7126081eb9b9c593cfd1987f6ac6cc61806dfa
|
Provenance
The following attestation bundles were made for npmctl_digitalocean-0.3.10.tar.gz:
Publisher:
release.yml on groupsum/npmctl
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
npmctl_digitalocean-0.3.10.tar.gz -
Subject digest:
d13db020ca149d8513c467ef741c381d276b9bc5c57c2cd0e4828232f10b158d - Sigstore transparency entry: 1572086127
- Sigstore integration time:
-
Permalink:
groupsum/npmctl@0ed62af559fadb57569bbc14e3482e96aa3d5eb7 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/groupsum
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0ed62af559fadb57569bbc14e3482e96aa3d5eb7 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file npmctl_digitalocean-0.3.10-py3-none-any.whl.
File metadata
- Download URL: npmctl_digitalocean-0.3.10-py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8b23384422443e71d9fce76ccdc1da60face3016fdb84282770ad78247655372
|
|
| MD5 |
ea9d108ce2dc15eccce9b39a2dd5c971
|
|
| BLAKE2b-256 |
6f930ddac5642bae8b4b19da3519d3c09249cf9975758114e17bad82d2b2916c
|
Provenance
The following attestation bundles were made for npmctl_digitalocean-0.3.10-py3-none-any.whl:
Publisher:
release.yml on groupsum/npmctl
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
npmctl_digitalocean-0.3.10-py3-none-any.whl -
Subject digest:
8b23384422443e71d9fce76ccdc1da60face3016fdb84282770ad78247655372 - Sigstore transparency entry: 1572086198
- Sigstore integration time:
-
Permalink:
groupsum/npmctl@0ed62af559fadb57569bbc14e3482e96aa3d5eb7 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/groupsum
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0ed62af559fadb57569bbc14e3482e96aa3d5eb7 -
Trigger Event:
workflow_dispatch
-
Statement type: