v7.18.0
- Add a
--manoption to the default set of@extra_commandand@extra_group(viadefault_extra_params()): it prints the command's man page (roff) to stdout and exits. Also available as the@man_optiondecorator for plain Click CLIs. - Add an
--accessibleoption to the default set of@extra_commandand@extra_group(viadefault_extra_params()). Enabling it, or setting theACCESSIBLEenvironment variable, is equivalent to--no-color --table-format plain: it strips ANSI codes and renders tables without Unicode box-drawing characters, for screen readers. An explicit--coloror--table-format(on the command line or in a configuration file) keeps precedence. Also available as the@accessible_optiondecorator and theAccessibleOptionclass. - Add a
mansubcommand to theclick-extraCLI:click-extra man SCRIPT [SUBCOMMAND]...renders the man page (roff) of any external Click CLI without running it, resolving the target likeshow-params(console_scripts entry point,module:functionnotation,.pyfile, or module name). Both subcommands now also load.pyfile targets, which previously raised an unhandled error. - Generate man pages programmatically with the new
click_extra.man_pagemodule:render_manpage()for a single command,render_manpages()for the whole command tree (one page per subcommand), andwrite_manpages()to write.1files (handy from a Debianoverride_dh_installmanrule). Pages follow the man-pages(7) layout, discover subcommands dynamically, honor Click's\bno-rewrap marker andSOURCE_DATE_EPOCHfor reproducible builds, and mirror Cloup option groups as.SSsubsections (ungrouped options fall under anOther optionsheading). - Add a pre-configured
-0/--zero-exitoption flag, exposed as the@zero_exit_optiondecorator and theZeroExitOptionclass. It stores the user's intent inctx.metaunder the newZERO_EXITkey but does not alter the exit code itself: downstream code reads it to decide whether to suppress its non-zero "problems found" status. - Consolidate the
--time,--jobsand-0/--zero-exitoptions into a singleclick_extra.executionmodule. Theclick_extra.jobsandclick_extra.timersubmodules are removed: their decorators and classes (timer_option,jobs_option,TimerOption,JobsOption,CPU_COUNT,DEFAULT_JOBS) remain importable from theclick_extraroot. The--show-paramstable now reports these options underclick_extra.execution. - Honor the standard
POSIXLY_CORRECTenvironment variable. When it is present in the environment (regardless of value),ExtraContextforcesallow_interspersed_argstoFalse, so every Click Extra command and group stops parsing options at the first positional argument, matching GNU getopt-based tools. - Add the
run_config_validation()function and theValidationReportdataclass toclick_extra.config(both re-exported from the package root). They run the CLI-parameter strict check, the typed schema build, and every registeredConfigValidatorin a single pass, returning the typed schema instance, the extracted extension sub-trees, and the list ofValidationErrors.collect_all=Truegathers every error;collect_all=Falsestops at the first. Both--validate-configand normal--configloading now delegate to this primitive. - Unify configuration-loading errors under the single
ValidationErrortype. Unknown CLI-parameter keys (strict=True) and unknown schema fields (schema_strict=True) previously surfaced as an uncaughtValueErrortraceback during--configloading; they now stop the run with a critical-level log and exit code 1, the same failure mode as extension-validator errors. Code that caughtValueErrorfrom config loading should catch theSystemExitfrom the exit (or use--validate-config/run_config_validation()to inspect errors without exiting). - Fix
schema_strict=Truewrongly rejecting the contents of a configuration field marked as an extension point withEXTENSION_METADATA_KEYwhen the field's Python type is not a mapping. The dataclass adapter now honors the marker the same way the outer strict check does, so the marked sub-tree is kept intact instead of being flattened and reported as unknown keys.
Full changelog: v7.17.2...v7.18.0
🛡️ VirusTotal scans
| Binary | Detections | Analysis |
|---|---|---|
click-extra-7.18.0-linux-arm64.bin |
0 / 63 | View scan |
click-extra-7.18.0-linux-x64.bin |
0 / 64 | View scan |
click-extra-7.18.0-macos-arm64.bin |
2 / 60 | View scan |
click-extra-7.18.0-macos-x64.bin |
0 / 61 | View scan |
click-extra-7.18.0-windows-arm64.exe |
2 / 69 | View scan |
click-extra-7.18.0-windows-x64.exe |
8 / 71 | View scan |