Werk #15107: Extension packages: modernise command line interface

Komponente Checks & agents
Titel Extension packages: modernise command line interface
Datum 01.01.2023
Checkmk-Editon Checkmk Raw (CRE)
Checkmk-Version 2.2.0i1
Level Kleine Änderung
Klasse Neues Feature
Kompatibilität Inkompatibel - Manuelle Interaktion könnte erforderlich sein

We recently added new features to the extension packages (a.k.a. MKPs) manager.

These changes require some adjustments and modernisations of the commandline interface to get a consistent user experience.

The following changes are made to the commandline interface mkp [COMMAND]:

find [--all] [--json]: The find command now reports some details for each file. If you are using the command in a script, we recommend setting the new --json flag, and pipe the output through the commandline tool "jq". To get a list of all local files, for instance, use "mkp find --json --all | jq .[].file ".

inspect PATH_TO_MKP_FILE: This is a new command to show the contents of an MKP file as listed in its manifest file (a.k.a. "info"). The show and list commands no longer accept paths as argument.

show-all This is a new command to show the contents of all MKPs known to the sites extension package manager.

files NAME [VERSION] This is a new command that replaces list NAME.

list This command no longer accepts an argument. It will print a table of packages, similar to what the WATO setup page shows.

add PATH_TO_FILE: This is a new command to add an MKP to the collection of MKPs managed by this tool. This command corresponds to the "upload" action in the GUI.

install: This command is replaced by the commands add and enable, to reflect the GUI actions.

update-active-packages is renamed to update-active.

create/pack are replaced by template/package: The template command will create a template of a package manifest for you, much like create used to. However: This template is created in the folder for temporary files. It will not alter the state of your packaging configuration in any way. After you have finalized your work on the template, you can create the actual package using the package command. This will create the package in the package store and install it.

Zur Liste aller Werks