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 (max, min, avg, stddev, median, total, count), sorted by nameserver name, address, then median.--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.
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. |
--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":[…]}. |
--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. |
--restore PATH | string | Restore DNS packet cache before the run. |
Resolver/Profile Overrides
| Flag | Type | Details |
|---|---|---|
--no-ipv4 | bool | Disable IPv4 queries. |
--no-ipv6 | bool | Disable IPv6 queries. |
--ipv6 | bool | Force IPv6 queries. |
--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.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.jsonShow per-nameserver query timing statistics:
gonemaster --nstimes example.comInclude nameserver timing data in JSON output:
gonemaster --json --nstimes example.com | jq .nameserver_timingsDisable 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
- Scoring: scoring.md