list-formats Command

The list-formats command displays all available import and export format handlers registered with the CLI.

Synopsis

MauroImportExport.Cli list-formats [--log-file FILE] [--log-level LEVEL]

Description

The list-formats command queries the plugin registry and displays a table of all available format handlers. For each format, it shows:

  • Format identifier (e.g., json, skos, dita)
  • Direction (Importer or Exporter)
  • Plugin version number

This command is useful for discovering which formats are supported and their version information before performing import or export operations.

Options

--log-file FILE
Specifies the path to the log file for recording operation details. Default is determined by assembly metadata.
--log-level LEVEL
Sets the minimum logging level. Valid values: Trace, Debug, Information, Warning, Error, Critical, None. Default: Error.
--help
Display help information for the list-formats command and exit

Exit Status

Code Description
0 Success - format list displayed
130 Operation cancelled by user (Ctrl+C)

Examples

The following examples illustrate the use of the list-formats command

Basic Usage

Display all available formats:

MauroImportExport.Cli list-formats

With Logging

Display formats and log to file:

MauroImportExport.Cli list-formats --log-file ~/logs/cli.log --log-level Information

Output Format

The command outputs a formatted table with the following columns:

  • Format: The format identifier used in import/export commands
  • Direction: Either "Importer" or "Exporter"
  • Version: The plugin version following semantic versioning

After the table, a summary line displays the total count of registered formats.

Notes

Tip:

Use this command before attempting import or export operations to verify that the required format handler is available.

Note:

Some formats may have both an importer and an exporter registered, appearing as separate rows in the output.