ZONEMASTER-CLI(1p)
π ZONEMASTER-CLI π
okay bestie, so this is zonemaster-cli from the Perl user-contributed docs, and it is literally your group chat with the Zonemaster test engine. Let me tell you everything. π«Ά
β¨ NAME β¨
zonemaster-cli β run Zonemaster tests from the command line. periodt. π
π SYNOPSIS π
zonemaster-cli [--help | --version | --list-tests]
zonemaster-cli [OPTIONS] --dump-profile
zonemaster-cli [OPTIONS] DOMAINNAME
πΈ DESCRIPTION πΈ
So zonemaster-cli is a command-line interface to the Zonemaster test engine. It takes the instructions you hand it as command line arguments, transforms them into suitable API calls to the engine, runs the test suite, and prints the resulting messages. π«
By default, the messages get translated by the engine's translation module, and when printed they come with the corresponding timestamp and logging level. The available options are all right down below, don't worry. π
π OPTIONS π
π Special Options π
-h,--helpβ Print brief usage information and exit. (runman zonemaster-clifor the full manual page) π₯Ί--versionβ Print version information and exit. The printed version numbers are the versions of this program as well as the ones from the underlying Zonemaster test engine. no cap, two for the price of one.--list-testsβ Print all test cases listed in the test modules, then exit. β¨--dump-profileβ Print the effective profile used in JSON format, then exit. π§
π¦ Testing Options π¦
--test=EXPRβ Specify which test cases to run by setting thetest_casesproperty in the profile. The EXPR is a flexible expression consisting of terms (individual test cases, test modules, orall) and operators (+to add,-to remove). For details, seeman zonemaster-cli.
An EXPR starting with a term (e.g., all, nameserver01) replaces the current selection. An EXPR starting with an operator (+ or -) modifies the current selection. An empty EXPR (--test=) does not modify the selection (i.e., it is a no-op).
Multiple --test options may be specified; they are applied in the order they are given. When used together with the --profile, the profile option is applied first.
Use --list-tests to list all test cases and test modules in the default profile.
Examples:
--test=allβ selects all test cases in the default profile, i.e. overrides any custom profile.--test=nameserverβ selects all test cases in the Nameserver test module in the default profile.--test=nameserver01β selects only the Nameserver01 test case.--test=dnssec-dnssec05β selects all DNSSEC test cases except DNSSEC05.--test=all-nameserver+nameserver03β selects all test cases, excludes the Nameserver test cases, and adds back Nameserver03.--test=-dnssecβ removes all DNSSEC test cases from the selection.--test=+syntax01+syntax02β adds the Syntax01 and Syntax02 test cases to the selection.--test=β empty value is valid, but does not 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β Specify the minimum level of a message to be printed. (default:NOTICE)
Messages with this level (or higher) will be printed. The levels are, from highest to lowest: CRITICAL, ERROR, WARNING, NOTICE, INFO, DEBUG, DEBUG2 and DEBUG3. 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. π
--stop-level=LEVELβ Specify 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. π
--[no-]ipv4,--[no-]ipv6β Enable or disable queries over IPv4 or IPv6. (default: both enabled)--sourceaddr4=IPADDR,--sourceaddr6=IPADDRβ Set IPv4 or IPv6 source address for DNS queries.
Setting an address not correctly configured on a local network interface fails silently. π (yeah. silently. rude.)
--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β Specify which locale to be used by the translation system. (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 does not exist, it will fall back to the local locale, and if that does not exist either, to English. π
--[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 a A and AAAA records lookup for that name is done in the live global DNS tree (unless overridden by --hints) and from which 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.
--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. bye bestie π--[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 allows users to override the default profile data with values from a profile JSON file with the --profile option. For details on profiles and how they are represented in files, see Zonemaster::Engine::Profile. π
π CONFIGURATION π
If there is 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 is 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. ποΈ
If there is a readable file .zonemaster/cli.args in the user's home directory, it will be used in the same way even when a global file has been loaded. Any argument in user's cli.args will override the same argument in the global config file.
For example, if one would like to by default run with the log level set to DEBUG and with translation to human-readable messages turned off, one could put this in the config file:
--raw
--level=DEBUG
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.
Any arguments actually given on the command line will override what is in any of the loaded config files. command line stays the main character, always. π
π¦ 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 vibe check bestie β this was perl v5.40.1, dated 2025-12-23, and it's giving iconic. go run some tests, you got this πβ¨π
π¦ where this page comes from
- ubuntu resolute: zonemaster-cli 8.0.1-1 Β· BSD-2-Clause
- ubuntu stonking: zonemaster-cli 8.0.1-1 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms