@asdsadw12312dwd2112xz/dns-lookup-cli
v1.0.0
Published
DNS lookup tool — A/AAAA/MX/TXT/NS/CNAME/SOA/SRV with propagation & reverse
Downloads
90
Maintainers
Readme
dns-lookup-cli
DNS lookup tool for the terminal. Supports A, AAAA, MX, TXT, NS, CNAME, SOA, SRV records with color-coded output, TTL display, reverse DNS, propagation checking, and JSON output.
Install
npm install -g dns-lookup-cliOr run without installing:
npx dns-lookup-cli <domain>Usage
dns-lookup-cli [options] [domains...]Options
| Flag | Description |
|------|-------------|
| -t, --type <type> | Record type: A, AAAA, MX, NS, TXT, CNAME, SOA, SRV, ALL (default: ALL) |
| -s, --server <ip> | Custom DNS server IP (default: system resolver) |
| -r, --reverse | Reverse DNS lookup (PTR) for IP address(es) |
| -p, --propagation | Check propagation across Google, Cloudflare, OpenDNS, Quad9, AdGuard |
| -j, --json | Output as JSON |
| -V, --version | Print version |
| -h, --help | Show help |
Examples
# All common records for a domain
dns-lookup-cli example.com
# Only MX records
dns-lookup-cli example.com --type MX
# Multiple domains at once
dns-lookup-cli example.com google.com
# Use Cloudflare DNS
dns-lookup-cli example.com --server 1.1.1.1
# Reverse lookup
dns-lookup-cli --reverse 8.8.8.8
# Check propagation of A records
dns-lookup-cli example.com --propagation
# Check propagation for a specific type
dns-lookup-cli example.com --propagation --type MX
# JSON output
dns-lookup-cli example.com --json
# JSON output piped to jq
dns-lookup-cli example.com --type A --json | jq '.results.A.records'Output
Records are color-coded by type:
- A — green
- AAAA — cyan
- MX — magenta (sorted by priority)
- NS — yellow
- TXT — blue
- CNAME — red
- SOA — white
- SRV — orange
Each record shows TTL and query time. Propagation check compares results across 5 major public resolvers and reports matches/mismatches.
Build from source
npm install
npm run build
node dist/index.js example.comLicense
MIT
