Skip to content

CLI Reference Guide

This guide provides a comprehensive list of all command-line options and flags available in Doggo.

Basic Syntax

doggo [--] [query options] [arguments...]

Query Options

OptionDescription
-q, --query=HOSTNAMEHostname to query the DNS records for (e.g., example.com)
-t, --type=TYPEType of the DNS Record (A, MX, NS, etc.)
-n, --nameserver=ADDRAddress of a specific nameserver to send queries to (e.g., 9.9.9.9, 8.8.8.8)
-c, --class=CLASSNetwork class of the DNS record (IN, CH, HS, etc.)
-x, --reversePerforms a reverse DNS lookup for an IPv4 or IPv6 address

Resolver Options

OptionDescription
--strategy=STRATEGYSpecify strategy to query nameservers (all, random, first)
--ndots=INTSpecify ndots parameter
--searchUse the search list defined in resolv.conf (default: true)
--timeout=DURATIONSpecify timeout for the resolver to return a response (e.g., 5s, 400ms, 1m)
-4, --ipv4Use IPv4 only
-6, --ipv6Use IPv6 only
--tls-hostname=HOSTNAMEProvide a hostname for TLS certificate verification
--skip-hostname-verificationSkip TLS Hostname Verification for DoT lookups

Query Flags

FlagDescription
--aaSet Authoritative Answer flag
--adSet Authenticated Data flag
--cdSet Checking Disabled flag
--rdSet Recursion Desired flag (default: true)
--zSet Z flag (reserved for future use)
--doSet DNSSEC OK flag

EDNS Options

EDNS (Extension Mechanisms for DNS) provides additional capabilities beyond basic DNS queries.

OptionDescription
--nsidRequest Name Server Identifier (NSID) to identify which nameserver responded
--cookieRequest DNS Cookie for enhanced security and protection against spoofing and amplification attacks
--paddingRequest EDNS padding for privacy (helps mitigate traffic analysis attacks by standardizing packet sizes)
--edeRequest Extended DNS Errors for detailed error information when queries fail
--ecs=SUBNETEDNS Client Subnet - sends client subnet information for geo-aware responses (e.g., 192.0.2.0/24 or 2001:db8::/32)

EDNS Examples

  1. Query with NSID to identify the responding nameserver:

    doggo example.com --nsid @1.1.1.1
  2. Use EDNS Client Subnet for geo-aware CDN responses:

    doggo example.com --ecs 8.8.8.0/24 @8.8.8.8
  3. Combine multiple EDNS options for privacy and debugging:

    doggo example.com --nsid --cookie --padding @1.1.1.1

Output Options

OptionDescription
-J, --jsonFormat the output as JSON
--shortShort output format (shows only the response section)
--colorEnable/disable colored output (default: true)
--debugEnable debug logging
--timeShow query response time

Transport Options

Specify the protocol with a URL-type scheme. UDP is used if no scheme is specified.

SchemeDescriptionExample
@udp://UDP query@1.1.1.1
@tcp://TCP query@tcp://1.1.1.1
@https://DNS over HTTPS (DoH)@https://cloudflare-dns.com/dns-query
@tls://DNS over TLS (DoT)@tls://1.1.1.1
@sdns://DNSCrypt or DoH using DNS stamp@sdns://...
@quic://DNS over QUIC@quic://dns.adguard.com

Globalping API Options

OptionDescriptionExample
--gp-fromSpecify the location to query from--gp-from Europe,Asia
--gp-limitLimit the number of probes to use--gp-limit 5

Examples

  1. Query a domain using defaults:

    doggo example.com
  2. Query for a CNAME record:

    doggo example.com CNAME
  3. Use a custom DNS resolver:

    doggo example.com MX @9.9.9.9
  4. Using named arguments:

    doggo -q example.com -t MX -n 1.1.1.1
  5. Query with specific flags:

    doggo example.com --aa --ad
  6. Query using Globalping API from a specific location:

    doggo example.com --gp-from Europe,Asia --gp-limit 5

For more detailed usage examples, refer to the Examples section.