kdig (Knot DNS)
$ kdig Foundation Low Riskkdig is Knot DNS's feature-rich DNS diagnostic client supporting UDP, TCP, DNS-over-TLS (+tls), DNS-over-HTTPS (+https), DNS-over-QUIC (+quic), EDNS Client Subnet, and DNSSEC validation. Provides +short for concise scripting and clean ANSI-free text output.
brew install knot Direct read-only DNS diagnostic binary supporting DoT/DoH/DoQ protocols (kdig +tls, kdig +https); faster and more faithful than any MCP wrapper.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Non-interactive, ANSI-clean stdout, and +short concise output mode, though structured output is zone-file text rather than native JSON.
+shortemits minimal line-oriented answers- Outputs BIND/zone-style text rather than JSON
Strictly read-only DNS client with support for encrypted and authenticated DoT/DoH/DoQ resolvers.
- Read-only DNS queries; supports TLS/HTTPS/QUIC transport encryption
Available on macOS (brew install knot) and Linux (knot-dnsutils), though installing via Homebrew pulls the full Knot DNS suite and Windows is unsupported.
- Requires
brew install knoton macOS orknot-dnsutilson Linux
Supports modern DoT, DoH, DoQ, PROXYv2, and EDNS extensions in one fast C binary.
- Native
+tls,+https,+quic, and+dnssecflags
Maintained by CZ.NIC (CZ-NIC/knot), the Czech ccTLD registry and Knot DNS foundation.
- Official CZ.NIC
CZ-NIC/knotrepository (GPL-3.0)
Detailed kdig(1) manual page and comprehensive kdig -h reference.
- Official
man_kdig.htmldocs andkdig -h
Security, Auth & Guardrails
No authentication credentials required; reads system CA certificates when validating +tls or +https resolvers.
Free, GPL-3.0 open-source C utility from CZ.NIC.
# kdig Agent Rules - Use `+short` when only the resolved record value is needed in scripts. - Pass explicit `+tls` or `+https` with a trusted resolver IP/hostname when testing encrypted DNS resolution.
Agent-Ready Command Recipes
Safe Read-Only Queries
kdig +tls @1.1.1.1 example.com A AAAA
Resolves A and AAAA records over encrypted DNS-over-TLS (+tls) on port 853.
kdig +https @dns.google example.com TXT +short
Fetches TXT records via DoH (+https) and prints only answer values (+short).
Strengths for Agents
- + Supports DoT (
+tls), DoH (+https), and DoQ (+quic) natively without external wrappers. - +
+shortand clean text output make simple lookups easy to consume in scripts.
Caveats & Pitfalls
- ! Outputs zone-file text rather than JSON; prefer
doggo --jsonordnsx -jwhen JSON is required. - ! macOS installation (
brew install knot) installs the entire Knot DNS server package alongsidekdig.