ZONEMASTER-CLI(1)
π ZONEMASTER-CLI π (that's the zonemaster-cli manual page, bestie, section 1, from the User Contributed Perl Documentation β¨)
okay so real talk: zonemaster-cli is your girl for running Zonemaster tests straight from the command line. she's iconic, she's fast, she's literally the whole vibe π
β¨ NAME β¨
zonemaster-cli β run Zonemaster tests from the command line π
π¦ SYNOPSIS π¦
zonemaster-cli [--help | --version | --list-tests]
zonemaster-cli [OPTIONS] --dump-profile
zonemaster-cli [OPTIONS] DOMAINNAME
πΈ DESCRIPTION πΈ
okay so picture this: zonemaster-cli is a command-line interface to the Zonemaster test engine π. it takes the instructions you give it as command line arguments, transforms them into the suitable API calls to the engine, runs the whole test suite, and prints the resulting messages. the way that works?? immaculate.
by default, those messages get translated by the engine's translation module, and each one is printed with its corresponding timestamp and logging level. no cap. scroll on down for all the available options, bestie π
π OPTIONS π
π Special Options π
-h,--helpβ print brief usage information and bail. (runman zonemaster-clifor the full manual page, iykyk)--versionβ print version information and bail β¨. the version numbers it prints are the versions of this program as well as the ones from the underlying Zonemaster test engine. two for one, we love to see it π«Ά--list-testsβ print all the test cases listed in the test modules, then exit. it's giving catalog energy π--dump-profileβ print the effective profile used, in JSON format, then exit π
π§ Testing Options π§
--test=EXPRβ pick which test cases to run by setting thetest_casesproperty in the profile.EXPRis a flexible expression made of terms (individual test cases, test modules, orall) and operators (+to add,-to remove). for the deets, seeman zonemaster-cli.
okay here's the tea on howEXPRbehaves π: anEXPRstarting with a term (e.g.,all,nameserver01) replaces the current selection. anEXPRstarting with an operator (+or-) modifies the current selection. an emptyEXPR(--test=) does not modify the selection (i.e., it's a no-op).
multiple --test options may be specified, and they're applied in the order they're given. when used together with --profile, the profile option gets applied first, no cap.
use --list-tests to list all test cases and test modules in the default profile π
the examples, slay by slay:
--test=allβ selects all test cases in the default profile, i.e. it overrides any custom profile. periodt.--test=nameserverβ selects all test cases in theNameservertest module in the default profile.--test=nameserver01β selects only theNameserver01test case π―--test=dnssec-dnssec05β selects all DNSSEC test cases exceptDNSSEC05.--test=all-nameserver+nameserver03β selects all test cases, excludes theNameservertest cases, and adds backNameserver03. the comeback tour π«--test=-dnssecβ removes all DNSSEC test cases from the selection.--test=+syntax01+syntax02β adds theSyntax01andSyntax02test cases to the selection.--test=β an empty value is valid, but it doesn't change the selection of test cases. specifying--test=without an argument is a no-op. having this possibility may come in handy when invokingzonemaster-clifrom scripts π
--level=LEVELβ set the minimum level of a message to be printed. (default:NOTICE)
messages at this level (or higher) get printed. the levels are, from highest to lowest: CRITICAL, ERROR, WARNING, NOTICE, INFO, DEBUG, DEBUG2 and DEBUG3. heads up π: the lowest three levels (DEBUG) add a significant amount of messages to be shown. they reveal some of the internal workings of the test engine, and are probably not useful for most users. like, you were warned, bestie.
--stop-level=LEVELβ set the minimum severity level after which the testing suite is terminated. (default: the empty string)
when set to the empty string, testing is allowed to complete normally no matter what messages are emitted π«Ά
the levels are, from highest to lowest: CRITICAL, ERROR, WARNING, NOTICE, INFO, DEBUG, DEBUG2 and DEBUG3.
--[no-]progressβ print an activity indicator ("spinner"). (default: enabled if the process' standard output is a TTY) useful to know that something is happening during a run π because staring at a silent terminal is not the vibe.--[no-]ipv4,--[no-]ipv6β enable or disable queries over IPv4 or IPv6. (default: both enabled) π--sourceaddr4=IPADDR,--sourceaddr6=IPADDRβ set the IPv4 or IPv6 source address for DNS queries.
β οΈ setting an address not correctly configured on a local network interface fails silently. like, no error, no nothing. rude but true π
--profile=FILEβ override the Zonemaster Engine default profile data with values from the given profile JSON file π
π Formatting Options π
--[no-]jsonβ print results as JSON instead of human language. (default: disabled)--[no-]json-streamβ stream the results as JSON. (default: disabled) useful to follow the progress in a machine-readable way π€--[no-]rawβ print messages as raw dumps (message identifiers) instead of translating them to human language.--locale=LOCALEβ pick which locale the translation system uses. (default: system locale or English)
if not given, the translation system itself will look at environment variables to try and guess π. if the requested translation doesn't exist, it'll fall back to the local locale, and if that doesn't exist either, to English. she's flexible like that π
--[no-]timeβ print the timestamp for each message. (default: enabled) β°--[no-]show-levelβ print the severity level for each message. (default: enabled)--[no-]show-moduleβ print the name of the module which produced the message. (default: disabled)--[no-]show-testcaseβ print the name of the test case (test case identifier) which produced the message. (default: disabled)
π Summary Options π
--[no-]countβ print a summary, at the end of a run, of the numbers of messages for each severity level that were logged during the run, as well as a count of each message tag. (default: disabled) π--[no-]nstimesβ print a summary, at the end of a run, of various metrics related to the times (in milliseconds) each name server took to answer, as well as a count of the number of sent queries per name server. (default: disabled) β±οΈ--[no-]elapsedβ print elapsed time (in seconds) at end of a run. (default: disabled)
π¦ Undelegated Test Options π¦
--ns=DOMAINNAME,--ns=DOMAINNAME/IPADDRβ provide information about a nameserver, for undelegated tests.
the argument must be either: (i) a domain name and an IP address, separated by a single slash character (/), or (ii) only a domain name β in which case an A and AAAA records lookup for that name is done in the live global DNS tree (unless overridden by --hints), and the results of that lookup will be used π³
this switch can be given multiple times. as long as any of these switches are present, their aggregated content will be used as the entirety of the parent-side delegation information. the whole thing, no cap π
--ds=KEYTAG,ALGORITHM,TYPE,DIGESTβ provide a DS record for undelegated testing (that is, a test where the delegating nameserver information is given via--nsswitches).
the four pieces of data (keytag, algorithm, type, digest) should be in the same format they would have in a zone file π
--hints=FILEβ name of a root hints file to override the defaults.
π§ Cache Options π§
--save=FILEβ write the contents of the accumulated DNS packet cache to a file with the given name, after the testing suite has finished running πΎ--restore=FILEβ prime the DNS packet cache with the contents from the file with the given name, before starting the testing suite.
the format of the file should be from one produced by the --save switch π
π Deprecated Options π
--encoding=ENCODINGβ deprecated: simply remove it from your usage. it is ignored. like it literally does nothing, just let her go π--[no-]json-translateβ deprecated since v2023.1, use--no-rawinstead.
for streaming JSON output, include the translated message of the tag.
β Option Aliases β
these options are provided for compatibility with older scripts π«Ά. the first two are aliases for --help. the rest are aliases for their namesakes spelled with dash - instead of underscore _.
-?--usage--dump_profile--[no-]json_stream--[no-]json_translate--list_tests--[no-]show_level--[no-]show_module--[no-]show_testcase--stop_level=LEVEL
π₯ EXAMPLES π₯
zonemaster-cli zonemaster.net
zonemaster-cli --test=delegation --level=info --no-time zonemaster.net
zonemaster-cli --test=delegation01 --level=debug zonemaster.net
zonemaster-cli --list-tests
π PROFILES π
the testing and result analysis performed by Zonemaster Engine is always guided by a profile π. Zonemaster Engine has a default profile with sensible defaults. Zonemaster CLI lets users override the default profile data with values from a profile JSON file using the --profile option.
for details on profiles and how they're represented in files, see Zonemaster::Engine::Profile π
π CONFIGURATION π
if there's a readable file /etc/zonemaster/cli.args (Linux style), each line in that file will be prepended as an argument on the command line π. if no /etc/zonemaster/cli.args is found (or it's not readable) but /usr/local/etc/zonemaster/cli.args (FreeBSD style) is found and readable, then that file will be used instead. only one global file is loaded, bestie β no mixing.
if there's a readable file .zonemaster/cli.args in the user's home directory, it'll be used in the same way even when a global file has been loaded π . any argument in the user's cli.args will override the same argument in the global config file. user wins, always.
for example, if you'd like to by default run with the log level set to DEBUG and with translation to human-readable messages turned off, you could put this in the config file:
--raw
--level=DEBUG
rules of the road π: only one argument per line. if the argument has a value there must be a = between argument and value. a line starting with # is a comment. comments cannot be added on lines with arguments β pick a lane.
any arguments actually given on the command line will override what's in any of the loaded config files π
π SEE ALSO π
more complete documentation on Zonemaster and its tests can be found on <https://doc.zonemaster.net> π¦
π«Ά AUTHOR π«Ά
Calle Dybedahl <calle@init.se> and others from the Zonemaster project π
and that's the whole thing, bestie β¨ this page was brought to you by perl v5.42.3 and dated 2026-06-29. go forth and test those zones ππ
π¦ where this page comes from
- nixpkgs unstable: perl5.42.3-Zonemaster-CLI 8.0.2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms