CLI
This page documents gonemaster, the direct local test runner. It runs the
engine in the current process without gonemaster-server.
gonemaster normalizes IDN domains to IDNA A-labels before use.
This page is for the local runner only. The server client is documented under client/ , including job and batch operations.
Installation
Install the CLI with Go:
go install codeberg.org/pawal/gonemaster/cmd/gonemaster@latestFor local development from a checkout:
go build -o gonemaster ./cmd/gonemasterSynopsis
gonemaster [flags] [DOMAIN]Notes:
DOMAINcan be provided as a positional argument or with--domain.--domainor positionalDOMAINis required for test runs.--version,--list-tests, and--dump-profiledo not require a domain.- Malformed undelegated inputs such as
--nsor--dsreturn exit code2. - The built-in profile uses
resolver.defaults.parallel=8andresolver.defaults.unordered=true. - For deterministic ordered behavior, use
--ordered --parallel 1.
Exit Codes
0: success2: usage or runtime error130: interrupted by signal
Output Modes
Default output is translated human-readable text on stdout. Progress goes to stderr when stdout is a terminal.
| Mode | Flag |
|---|---|
| Human-readable text | default |
| Single JSON array | --json |
| Newline-delimited JSON | --json-stream |
| Raw log lines | --raw |
| Effective profile JSON | --dump-profile |
Additional output controls:
--countappends human-readable level and tag counts.--nstimesappends per-nameserver timing statistics.--debug-queriesappends a per-nameserver query trace: attempts, timeouts, errors, canceled attempts and skip decisions.--output PATHwrites selected output to a file.--save PATHwrites the DNS packet cache after the run.--restore PATHprimes the DNS packet cache before the run.--cache-stats PATHprints statistics for a saved cache file and exits.--cache-stricttreats cache-file warnings (unknown fields/kinds, missing checksum) as errors when restoring or inspecting.
See cache-format.md for the packet cache file schema.
Machine-Consumer Result Contract
Use --json or --json-stream for machine consumption.
For migrated coherent entries:
args.nsis the nameserver name.args.addressis the nameserver IP address.args.serversis an array of{ns, address}objects.args.asnsis an array of ASN integers when ASN data is emitted.
Legacy keys can still appear on non-migrated tags during migration. Prefer the v1.1 keys when they are present.
Reference:
Options
The flag groups below follow gonemaster --help.
Target
| Flag | Type | Details |
|---|---|---|
DOMAIN | positional | Zone name to test. Alternative to --domain. |
--domain DOMAIN | string | Zone name to test. Required for runs when positional DOMAIN is not provided. |
--module MODULE | string | Run one module. |
--testcase TESTCASE | string (repeatable) | Run a specific testcase. May be passed multiple times to run several testcases, possibly across modules. Names are case-insensitive. |
--exclude NAME | string (repeatable) | Skip a testcase or every testcase of a module. Accepts a comma-separated list. See Testcase selection . |
--profile PATH | string | Profile file in JSON or YAML. |
Output
| Flag | Type | Details |
|---|---|---|
--min-level LEVEL | string | Minimum log level. Default NOTICE. |
--stop-level LEVEL | string | Stop after the first entry at this level or higher. |
--locale LOCALE | string | Locale for translated output. |
--output PATH | string | Write output to a file. |
--raw | bool | Stream raw log entries. |
--json | bool | Print one JSON array. |
--json-stream | bool | Stream newline-delimited JSON entries. |
--count | bool | Append count summaries in human output. |
--nstimes | bool | Append per-nameserver timing statistics. With --json, wraps output as {"entries":[…],"nameserver_timings":[…]}. |
--debug-queries | bool | Append a per-attempt query trace table: attempts, timeouts, errors, canceled attempts, elapsed time and skip decisions per nameserver address. Human output only. |
--no-progress | bool | Disable progress indicator. |
--score | bool | Print score and grade summary after the run. |
--no-score | bool | Suppress score output. |
--scoring-config PATH | string | Custom scoring config JSON file. Implies --score. |
Cache
| Flag | Type | Details |
|---|---|---|
--save PATH | string | Save DNS packet cache after the run. |
--save-compress | bool | Gzip-compress the saved cache file (also implied by a .gz path). |
--save-max-entries N | int | Refuse to save if the cache file would contain more than N entries (0 = unlimited). |
--restore PATH | string | Restore DNS packet cache before the run. |
--cache-stats PATH | string | Print statistics for a saved cache file and exit. |
--cache-strict | bool | Treat cache-file warnings (unknown fields/kinds, missing checksum) as errors. |
Resolver/Profile Overrides
| Flag | Type | Details |
|---|---|---|
--no-ipv4 | bool | Disable IPv4 queries. |
--no-ipv6 | bool | Disable IPv6 queries. |
--ipv6 | bool | Force IPv6 queries. Without --ipv6 or --no-ipv6, the run turns IPv6 off when the host has no route to a global IPv6 address, and logs IPV6_AUTO_DISABLED. |
--allow-non-global | bool | Allow querying private / non-globally-reachable nameserver addresses. Off by default: such targets are skipped with a NON_GLOBAL_QUERY_BLOCKED notice. Use for internal/split-horizon zones. |
--parallel N | int | Override resolver parallelism. |
--unordered | bool | Allow unordered resolver behavior. |
--ordered | bool | Force ordered resolver behavior. |
--timeout N | int | Override resolver timeout in seconds. |
--retry N | int | Override resolver retry count. |
--retrans N | int | Override resolver retransmit interval in seconds. |
--fallback | bool | Enable TCP fallback on UDP failure. |
--no-fallback | bool | Disable TCP fallback on UDP failure. |
--sourceaddr4 IPADDR | string | IPv4 source address for outgoing queries. |
--sourceaddr6 IPADDR | string | IPv6 source address for outgoing queries. |
--error-cache-ttl N | int | Seconds to skip queries after network errors. |
--positive-cache-ttl N | int | Seconds to cache positive DNS responses. |
--negative-cache-ttl N | int | Seconds to cache negative DNS responses. |
--badkeys-path PATH | string | Badkeys blocklist directory path. |
Undelegated
| Flag | Type | Details |
|---|---|---|
--ns NAME[/IP] | repeatable | Undelegated nameserver input. |
--ds KEYTAG,ALGORITHM,DIGTYPE,DIGEST | repeatable | Undelegated DS input. |
Utility
| Flag | Type | Details |
|---|---|---|
--badkeys-update | bool | Download or update badkeys blocklist data and exit. |
--dump-profile | bool | Print effective profile JSON and exit. |
--list-tests | bool | List available testcases and exit. |
--version | bool | Print version information and exit. |
--raw, --json, and --json-stream are mutually exclusive.
--count is human-output only.
Examples
Run a full test:
gonemaster example.comRun one module and testcase:
gonemaster --module address --testcase address01 example.comRun several testcases (across modules):
gonemaster --testcase consistency04 --testcase delegation07 example.comRun the profile without the DNSSEC module and zone11:
gonemaster --exclude dnssec,zone11 example.comPrint JSON:
gonemaster --json --domain example.com | jqStream JSON entries to a file:
gonemaster --json-stream --output /tmp/gonemaster.jsonl --domain example.comSave and replay a DNS packet cache:
gonemaster --domain example.com --save /tmp/gonemaster-cache.json
gonemaster --domain example.com --restore /tmp/gonemaster-cache.jsonInspect a saved cache file without running a test:
gonemaster --cache-stats /tmp/gonemaster-cache.jsonShow per-nameserver query timing statistics:
gonemaster --nstimes example.comThe table holds max, min, avg, stddev, median, total and count, sorted by
nameserver name, address, then median, and covers answered queries only. The
timeout column counts exchanges that spent every attempt without an answer,
and refused counts responses carrying rcode REFUSED.
Include nameserver timing data in JSON output:
gonemaster --json --nstimes example.com | jq .nameserver_timingsTrace every query attempt and the skip decisions, slowest nameserver first:
gonemaster --debug-queries example.comThe columns and decision kinds are described in debugging.md .
Disable IPv6 and raise parallelism:
gonemaster --no-ipv6 --parallel 4 --domain example.comDump the effective profile:
gonemaster --dump-profile --profile ./profile.yamlList available test cases:
gonemaster --list-testsHigh-performance test with Swedish output:
gonemaster --unordered --parallel 8 --locale sv --domain example.comUndelegated test with explicit nameservers and glue:
gonemaster --domain example.com \
--ns ns1.example.com/192.0.2.10 \
--ns ns2.example.net/2001:db8::10Undelegated test with one nameserver and both IPv4 and IPv6:
gonemaster --domain example.com \
--ns ns1.example.com/192.0.2.10 \
--ns ns1.example.com/2001:db8::10Undelegated DS-only test:
gonemaster --domain example.com \
--ds 12345,13,2,0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEFRun a test and display score and grade:
gonemaster --score example.comUse a custom scoring config:
gonemaster --scoring-config /etc/gonemaster/scoring.json example.comScore with JSON output. The score goes to stderr to keep stdout valid JSON.
gonemaster --json --score example.com | jqExtract coherent nameserver name and IP pairs:
gonemaster --json-stream --domain example.com \
| jq -r 'select(.args.ns and .args.address)
| [.args.ns, .args.address] | @tsv'Extract ASN lists:
gonemaster --json --domain example.com \
| jq -r '.[]
| select(.args.asns != null)
| [.tag, (.args.asns | map(tostring) | join(","))] | @tsv'Badkeys Blocklist Setup
Update blocklist data in the default user data directory:
gonemaster --badkeys-updateFor developers and packagers, update blocklist data in share/badkeys/:
make badkeys-updateFurther Reference
- Testcase specifications: specifications/tests/
- Tag catalogs: specifications/tags/
- Cache format: cache-format.md
- Debugging a run: debugging.md
- Scoring: scoring.md