Skip to main content

Manage your DevNomads services from the command line

Project description

dncli

Manage your DevNomads services from the command line: inspect your services, manage DNS zones and records, and move zones over from other providers - from a shell or a script.

The command is dncli - named to avoid clashing with the macOS dnctl traffic-shaper at /usr/sbin/dnctl. Install it from PyPI as devnomads-cli.

Install

pip install devnomads-cli

For a global, isolated install (recommended on workstations), use uv or pipx instead - same result, no interference with system packages:

uv tool install devnomads-cli   # or: pipx install devnomads-cli

Enable shell completion (bash, zsh, fish, PowerShell):

dncli --install-completion

Getting started

Create an API key in the DevNomads portal under Profiel -> API Sleutels, then store it:

dncli configure

The key is written to ~/.config/dncli/credentials, readable only by you. From here every command works:

dncli services list
dncli domains list
dncli containers show <id>

Every DevNomads product has its own command group - apps, buckets, containers, databases, domains, emails, forwards, proxies, servers, sites and more. Explore with dncli --help and dncli <group> --help.

Commands accept any unambiguous prefix: dncli e l is dncli emails list. An ambiguous prefix lists the candidates.

Managing DNS

dncli dns zones list
dncli dns zones show example.com
dncli dns records list example.com
dncli dns records set example.com www A 192.0.2.1 --ttl 3600
dncli dns records delete example.com www A

Moving a zone from another provider

dncli dns transfer copies a zone from your current DNS provider into DevNomads. It reads the records at the source (never writes there), shows you the changes, and applies them after confirmation:

dncli configure --provider transip       # store source credentials
dncli dns transfer --from transip --zone example.com --dry-run
dncli dns transfer --from transip --zone example.com

Supported source providers: TransIP and AuroraDNS. The zone must already exist at DevNomads; register or transfer the domain in the portal first.

Multiple accounts

Store each account as a named profile and select it per command or per shell:

dncli configure --profile acme
dncli services list --profile acme
export DN_PROFILE=acme

Scripting

Output is a human-readable table on a terminal and JSON when piped, so pipelines get parseable output without any flags; --output json|table forces either. Data goes to stdout, everything else (warnings, prompts, status messages) to stderr, so dncli ... | jq . is always safe.

In CI and pipelines, skip the credentials file and pass the key via the environment:

export DN_API_KEY=...        # beats any stored profile
dncli services list | jq -r '.[].entity'

Certificates

dncli issues Let's Encrypt certificates using the DNS-01 challenge:

dncli cert issue example.com -d www.example.com -d "*.example.com"

The first argument is the primary domain (the certificate CN); add extra names (SANs) by repeating --san/-d. Every name must live in one of your DevNomads DNS zones, and that zone must be delegated to the DevNomads nameservers (one.dns.infrapod.nl, two.dns.infrapod.nl, three.dns.infrapod.eu) - otherwise issuance is refused, since the DNS-01 challenge records would not be visible to the CA.

The certificate is always written to ~/.config/dncli/certs/<domain>/ as cert.pem, fullchain.pem, chain.pem, and privkey.pem (0600). Pass --out <file> to additionally export a single PEM bundle of exactly three blocks - the key, the certificate, and the issuing intermediate, in that order. Add -v/--verbose for detailed ACME progress.

Keys are ECDSA P-384 by default. Pick another with --key-type (ecdsa256, ecdsa384, ecdsa521, rsa2048, rsa4096).

Re-running cert issue is a no-op while the existing certificate is still valid for more than 21 days; pass --force to re-issue anyway.

List what you have issued and re-export any of them - as a PEM bundle or a PKCS#12 (.pfx) file - without re-issuing:

dncli cert list
dncli cert export example.com --out bundle.pem    # omit --out to print
dncli cert export example.com --format pfx --out bundle.pfx
dncli cert export example.com --format pfx --out bundle.pfx --passphrase secret

The .pfx is unencrypted unless you pass --passphrase (alias --password). Both bundle formats carry the same three items: key, certificate, and the issuing intermediate.

A dehydrated-compatible DNS-01 hook ships as dncli-dns-hook:

# dehydrated/config
CHALLENGETYPE="dns-01"
HOOK="dncli-dns-hook"

License

MIT.

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

devnomads_cli-0.5.2.tar.gz (42.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

devnomads_cli-0.5.2-py3-none-any.whl (27.1 kB view details)

Uploaded Python 3

File details

Details for the file devnomads_cli-0.5.2.tar.gz.

File metadata

  • Download URL: devnomads_cli-0.5.2.tar.gz
  • Upload date:
  • Size: 42.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Alpine Linux","version":"3.23.4","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for devnomads_cli-0.5.2.tar.gz
Algorithm Hash digest
SHA256 833893ed267b48c4bf8b255c1163ea0ddd1ad6ee39eab0dd37bda4931528c12d
MD5 7f28a4ad2cc9a16b622c4a06f01abe19
BLAKE2b-256 d2d7a21d60fbcbbd3a715640bcf1a255c0bd860969ef0e5a2e512b824c589037

See more details on using hashes here.

File details

Details for the file devnomads_cli-0.5.2-py3-none-any.whl.

File metadata

  • Download URL: devnomads_cli-0.5.2-py3-none-any.whl
  • Upload date:
  • Size: 27.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Alpine Linux","version":"3.23.4","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for devnomads_cli-0.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 80d0e9c4140f64a29b8d9e7961b64311e94b2d8850dade4ab65c6d777182aa39
MD5 d744c10f90e2b1f25342e83a4c277d0a
BLAKE2b-256 43b6efc3ed93caa30fa79efc03d2326f5706b24358ff1b56914637e46260cd2a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page