Skip to main content

CLI and terminal UI for managing DNSPod records.

Project description

DNSPod Tool

CLI and terminal UI for managing DNSPod domains and records.

Chinese documentation: README.zh-CN.md.

Installation

Install with pipx:

pipx install dnspod-tool

Or install with uv:

uv tool install dnspod-tool

On a Linux server without pipx or uv, use a virtual environment:

python3 -m venv .venv
. .venv/bin/activate
python -m pip install dnspod-tool

To install the latest development version from GitHub:

pipx install git+https://github.com/Bia951/dnspod-tool.git

After installation, run dnspod to open the terminal UI or inspect the CLI commands:

dnspod
dnspod --help

Credentials

Credential lookup order:

  1. Command-line credentials for the current command
  2. Environment variables
  3. System keyring
  4. Local credentials file

For headless Linux servers, environment variables are usually the cleanest option:

export DNSPOD_TOKEN_ID="12345"
export DNSPOD_TOKEN="your-token"

or Tencent Cloud keys:

export TENCENTCLOUD_SECRET_ID="your-secret-id"
export TENCENTCLOUD_SECRET_KEY="your-secret-key"

You can also save credentials:

dnspod auth token --id 12345 --token your-token --storage auto
dnspod auth key --secret-id your-secret-id --secret-key your-secret-key --storage auto

Use --storage file on headless Linux if system keyring is unavailable.

Both authentication modes are supported:

  • DNSPod token: --token-id and --token
  • Tencent Cloud key: --secret-id and --secret-key

Handy workflow

Set a default domain once:

dnspod use example.com

Then use short commands:

dnspod ls
dnspod add www A 203.0.113.10
dnspod set www A 203.0.113.11
dnspod del www

You can still pass a domain when needed:

dnspod ls example.com
dnspod add example.com api CNAME target.example.com
dnspod set example.com www A 203.0.113.11
dnspod del example.com www A --yes

set is an upsert command: it updates the matching name + type record if one exists, or creates it if none exists. If multiple records match, it prints the matches and asks you to use the record ID through the full command.

Profiles keep credentials and the default domain separate:

dnspod --profile work auth key --secret-id your-secret-id --secret-key your-secret-key
dnspod --profile work use example.com
dnspod --profile work ls

The --profile / -p option can be placed anywhere:

dnspod ls -p work
dnspod -p work ls

Full CLI examples

dnspod domains list
dnspod records list example.com
dnspod records create example.com --name www --type A --value 203.0.113.10
dnspod records update example.com 123456 --value 203.0.113.11
dnspod records delete example.com 123456 --yes

You can also pass credentials directly when running a command:

dnspod records list example.com --token-id 12345 --token your-token
dnspod records list example.com --secret-id your-secret-id --secret-key your-secret-key

When command-line credentials are provided in an interactive terminal, the tool asks whether to save them locally. For scripts and CI, it does not prompt unless you pass --save-credentials.

dnspod records list example.com \
  --secret-id your-secret-id \
  --secret-key your-secret-key \
  --save-credentials \
  --auth-storage file

JSON output:

dnspod records list example.com --json

Terminal UI

Run without arguments or use:

dnspod tui

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

dnspod_tool-0.1.1.tar.gz (31.6 kB view details)

Uploaded Source

Built Distribution

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

dnspod_tool-0.1.1-py3-none-any.whl (31.0 kB view details)

Uploaded Python 3

File details

Details for the file dnspod_tool-0.1.1.tar.gz.

File metadata

  • Download URL: dnspod_tool-0.1.1.tar.gz
  • Upload date:
  • Size: 31.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dnspod_tool-0.1.1.tar.gz
Algorithm Hash digest
SHA256 cae1c40828274df89a4d31cb6432f84a1f87519ec1435f1d3585113022cfceac
MD5 cb6adc5e404a9cf0032cb43b0f3d9954
BLAKE2b-256 3eaaef210abebf3253a3403f256b204f95b7c015bd8b30f4e9d0610f8a8e6fab

See more details on using hashes here.

Provenance

The following attestation bundles were made for dnspod_tool-0.1.1.tar.gz:

Publisher: publish-to-pypi.yml on Bia951/dnspod-tool

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dnspod_tool-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: dnspod_tool-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 31.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dnspod_tool-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0125ad68575019daa4094af840a114ad7ba2ef6a9d4cb51ffcc98a490dbbba27
MD5 b886737b0bbf9e4149a8599541b048ac
BLAKE2b-256 89daa4dc889b5082dff6e79307b7068fc76415443a8a9f430e529f2361a1186a

See more details on using hashes here.

Provenance

The following attestation bundles were made for dnspod_tool-0.1.1-py3-none-any.whl:

Publisher: publish-to-pypi.yml on Bia951/dnspod-tool

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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