ChatDNS
ChatDNS 是 ChatArch 的 DNS、DDNS 与 ACME DNS-01 证书工具。它统一 Aliyun DNS 与 Tencent Cloud / DNSPod provider,通过 ChatEnv profile 选择账号,并将证书安全写入 $CHATARCH_HOME/certs/<registered-domain>/<cert-path>/。
- 文档:https://arch.gh.wzhecnu.cn/ChatDNS/
- 快速开始:https://arch.gh.wzhecnu.cn/ChatDNS/quickstart/
- CLI 树:https://arch.gh.wzhecnu.cn/ChatDNS/cli-tree/
- 证书规则:https://arch.gh.wzhecnu.cn/ChatDNS/certificate-storage/
按场景进入
| 目标 | 入口 |
|---|---|
| 第一次安装并安全验证 profile | 快速开始 |
| 查找命令、参数和副作用 | CLI 树 |
| 理解证书目录、SAN 复用和 symlink 拒绝规则 | 证书目录与创建规则 |
| 直接查看所有公开命令 | chatdns --help |
安装
推荐使用 Python 3.12;包元数据中的 >=3.10 只表示最低兼容版本,不会把环境固定到 Python 3.10。
uv venv --python 3.12
uv pip install ChatDNS
chatdns --version
开发安装:
uv pip install -e '.[dev,docs]'
安全起步
先选择 ChatEnv profile 和 provider,再从只读命令开始:
chatdns --env work list --provider tencent
chatdns --env work records example.com --provider tencent
chatdns ip --type public
chatdns --env work cert check '*.example.com' --cert-path default
确认账号、zone 与记录无误后,再执行 set、delete、ddns 或 cert apply。
CLI 树
chatdns
├── cert
│ ├── apply # DNS-01 申请并安装证书;写 DNS 与本地证书
│ ├── check # 只读检查本地证书状态
│ └── manifest # 只读渲染 Infra manifest
├── ddns # 单次或持续更新 A 记录
├── delete # 删除记录
├── ip # 查询 public/local IP
├── list # 列出 managed zones
├── records # 查询记录
└── set # 幂等设置记录
完整参数、profile 位置规则、交互选项和副作用矩阵见 CLI 树。
配置解析
Provider 选择顺序:
- 命令行
--provider; - ChatDNS profile 的
CHATDNS_PROVIDER; - 默认
aliyun。
Profile 使用全局 chatdns --env PROFILE ... 选择;DNS 命令也支持命令级 --env。Aliyun 与 Tencent 凭据由同名 ChatEnv profile 读取,敏感值不写入仓库。
能力与边界
| 操作 | 副作用 |
|---|---|
list、records |
provider 只读 API |
ip |
本机接口读取或公网 IP 查询 |
cert check、cert manifest |
本地只读 |
set、delete、ddns |
写 DNS provider |
cert apply |
写 DNS challenge 与本地证书 |
ChatDNS 负责 DNS、证书申请/检查和 manifest 解析;SSH 分发、Nginx rewrite/reload 与服务器 rollback 属于 Infra,不在 ChatDNS 中执行。
Python API 与 MCP
from chatdns import create_dns_client, DynamicIPUpdater, SSLCertUpdater
MCP 暴露 DNS 查询/设置、IP 查询、DDNS 与证书申请工具;MCP 工具不属于 CLI 子命令。完整映射见 CLI 树。
验证
pytest -q
mkdocs build --strict
License
MIT
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 chatdns-0.1.7.tar.gz.
File metadata
- Download URL: chatdns-0.1.7.tar.gz
- Upload date:
- Size: 47.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf2ce9bed78cba740f9eec0b3268fe4dad0c8f8fd6fd2a8be39b68fcd2fa7ee6
|
|
| MD5 |
2e0704b1d326959d0d0d79ba6ad8ec9f
|
|
| BLAKE2b-256 |
70d41660f95802912ce08b3e8e5cec5ee6805d1d2bbd6bbdeb1a94e139ee893a
|
Provenance
The following attestation bundles were made for chatdns-0.1.7.tar.gz:
Publisher:
publish.yml on ChatArch/ChatDNS
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
chatdns-0.1.7.tar.gz -
Subject digest:
bf2ce9bed78cba740f9eec0b3268fe4dad0c8f8fd6fd2a8be39b68fcd2fa7ee6 - Sigstore transparency entry: 2341246149
- Sigstore integration time:
-
Permalink:
ChatArch/ChatDNS@7a111f28d3ee937b4a8023ce95c8dd0d41d30502 -
Branch / Tag:
refs/tags/v0.1.7 - Owner: https://github.com/ChatArch
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7a111f28d3ee937b4a8023ce95c8dd0d41d30502 -
Trigger Event:
push
-
Statement type:
File details
Details for the file chatdns-0.1.7-py3-none-any.whl.
File metadata
- Download URL: chatdns-0.1.7-py3-none-any.whl
- Upload date:
- Size: 43.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4991a398b24564bf02bb5b8ab2909bf93855401e35be385295379bb22b3d7642
|
|
| MD5 |
f1b135ae9994089d99d726fe2411ef74
|
|
| BLAKE2b-256 |
d5ce8c9b56ecc3b36b8a5f420af39427218ecd5a0eeafd910c8c8e38b2b73351
|
Provenance
The following attestation bundles were made for chatdns-0.1.7-py3-none-any.whl:
Publisher:
publish.yml on ChatArch/ChatDNS
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
chatdns-0.1.7-py3-none-any.whl -
Subject digest:
4991a398b24564bf02bb5b8ab2909bf93855401e35be385295379bb22b3d7642 - Sigstore transparency entry: 2341246162
- Sigstore integration time:
-
Permalink:
ChatArch/ChatDNS@7a111f28d3ee937b4a8023ce95c8dd0d41d30502 -
Branch / Tag:
refs/tags/v0.1.7 - Owner: https://github.com/ChatArch
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7a111f28d3ee937b4a8023ce95c8dd0d41d30502 -
Trigger Event:
push
-
Statement type: