Command-line interface reference

Purpose

Complete reference for all Cabriolet command-line tools. Cabriolet provides unified commands that work with all supported formats through automatic format detection.

Concepts

Cabriolet provides a unified command-line interface that automatically detects the archive format and dispatches to the appropriate handler. This eliminates the need to know the format before choosing a command.

The unified commands (list, extract, create, info, test) work with all supported formats. Format-specific legacy commands (e.g., chm-list, expand) are maintained for backward compatibility but are not recommended for new usage.

Quick command index

Command Purpose

=== Unified Commands (Recommended)

list FILE

List contents of any archive (auto-detects format)

extract FILE [OUTPUT_DIR]

Extract files from any archive (auto-detects format)

create OUTPUT FILES…​

Create archive file (auto-detects format from extension)

info FILE

Show detailed archive information (auto-detects format)

test FILE

Test archive file integrity (auto-detects format)

search FILE

Find embedded CAB files (CAB-only)

=== Legacy Commands (Backward Compatibility)

chm-list FILE

List CHM contents (use: list --format chm FILE)

chm-extract FILE [OUTPUT]

Extract CHM files (use: extract --format chm FILE)

chm-info FILE

Show CHM details (use: info --format chm FILE)

chm-create OUTPUT FILES…​

Create CHM file (use: create --format chm OUTPUT FILES…​)

expand FILE [OUTPUT]

Expand SZDD file (use: extract --format szdd FILE)

compress FILE [OUTPUT]

Compress to SZDD (use: create --format szdd OUTPUT FILE)

szdd-info FILE

Show SZDD details (use: info --format szdd FILE)

kwaj-extract FILE [OUTPUT]

Extract KWAJ file (use: extract --format kwaj FILE)

kwaj-compress FILE [OUTPUT]

Compress to KWAJ (use: create --format kwaj OUTPUT FILE)

kwaj-info FILE

Show KWAJ details (use: info --format kwaj FILE)

hlp-extract FILE [OUTPUT_DIR]

Extract HLP file (use: extract --format hlp FILE)

hlp-create OUTPUT FILES…​

Create HLP file (use: create --format hlp OUTPUT FILES…​)

hlp-info FILE

Show HLP details (use: info --format hlp FILE)

lit-extract FILE [OUTPUT_DIR]

Extract LIT file (use: extract --format lit FILE)

lit-create OUTPUT FILES…​

Create LIT file (use: create --format lit OUTPUT FILES…​)

lit-info FILE

Show LIT details (use: info --format lit FILE)

oab-extract INPUT OUTPUT

Extract OAB file (use: extract --format oab INPUT --output OUTPUT)

oab-create INPUT OUTPUT

Create OAB file (use: create --format oab OUTPUT INPUT)

oab-info FILE

Show OAB details (use: info --format oab FILE) ===

=== Unified Commands

==== list FILE

List contents of any archive file. The format is automatically detected from the file signature.

[source,bash] ---- cabriolet list archive.cab cabriolet list help.chm cabriolet list compressed_ ----

See CAB list documentation for detailed output format.

==== extract FILE [OUTPUT_DIR]

Extract files from any archive. The format is automatically detected.

[source,bash] ---- cabriolet extract archive.cab output/ cabriolet extract help.chm cabriolet extract compressed_ output.txt ----

Options:

* --output, -o DIR - Output directory or file path * --salvage - Enable salvage mode for corrupted files (CAB only) * --base-file FILE - Base file for incremental patches (OAB only)

==== create OUTPUT FILES…​

Create an archive file. The format is detected from the output file extension.

[source,bash] ---- cabriolet create archive.cab file1.txt file2.txt cabriolet create help.chm html_files/ cabriolet create compressed_ input.txt ----

Options:

* --format FORMAT - Override format detection * --compression TYPE - Compression type for CAB (none, mszip, lzx, quantum) * --window-bits N - LZX window size for CHM (15-21) * --compress - Enable compression for HLP/LIT (default: true)

==== info FILE

Show detailed information about any archive file.

[source,bash] ---- cabriolet info archive.cab cabriolet info help.chm ----

==== test FILE

Test the integrity of any archive file.

[source,bash] ---- cabriolet test archive.cab cabriolet test help.chm ----

==== search FILE

Search for embedded CAB files within another file. This command is specific to CAB format.

[source,bash] ---- cabriolet search installer.exe ----

=== Format Auto-Detection

Cabriolet automatically detects the format of input files by examining their file signatures:

[cols="1,2"]

|Format |Detection Method

|CAB |MSCF signature (first 4 bytes)

|CHM |ITSF signature (first 4 bytes)

|SZDD |SZDD signature (first 4 bytes)

|KWAJ |KWAJ signature (first 4 bytes)

|HLP |Internal header structure

|LIT |CHM signature with LIT-specific GUID

|OAB |OAB header signature ===

Manual Format Override

When auto-detection fails or you need to force a specific format, use the --format option:

cabriolet --format cab list archive.cab
cabriolet --format chm extract help.chm output/
cabriolet --format szdd extract compressed_

Supported format values: cab, chm, szdd, kwaj, hlp, lit, oab

Commands by Format

CAB (Cabinet Files)

See CAB Commands for complete documentation.

Unified commands: * list FILE - List archive contents * extract FILE [OUTPUT_DIR] - Extract all files * info FILE - Show detailed information * test FILE - Verify archive integrity * search FILE - Find embedded CAB files * create OUTPUT FILES…​ - Create new archive

CHM (Compiled HTML Help)

See CHM Commands for complete documentation.

Unified commands: * list FILE - List CHM contents * extract FILE [OUTPUT_DIR] - Extract CHM files * info FILE - Show CHM details * create OUTPUT FILES…​ - Create CHM file

SZDD (Single-file LZSS)

See SZDD Commands for complete documentation.

Unified commands: * list FILE - Show file information * extract FILE [OUTPUT] - Expand compressed file * info FILE - Show file details * create OUTPUT FILES…​ - Compress to SZDD

KWAJ (KWAJ Compression)

See KWAJ Commands for complete documentation.

Unified commands: * list FILE - Show file information * extract FILE [OUTPUT] - Extract KWAJ file * info FILE - Show file details * create OUTPUT FILES…​ - Compress to KWAJ

HLP (Windows Help)

See HLP Commands for complete documentation.

Unified commands: * list FILE - Show file information * extract FILE [OUTPUT_DIR] - Extract HLP file * info FILE - Show file details * create OUTPUT FILES…​ - Create HLP file

LIT (Microsoft Reader)

See LIT Commands for complete documentation.

Unified commands: * list FILE - Show file information * extract FILE [OUTPUT_DIR] - Extract LIT file * info FILE - Show file details * create OUTPUT FILES…​ - Create LIT file

OAB (Offline Address Book)

See OAB Commands for complete documentation.

Unified commands: * list FILE - Show file information * extract FILE --output OUTPUT - Extract OAB file * info FILE - Show file details * create OUTPUT FILES…​ - Create OAB file

Global Options

All commands support these options:

  • --format FORMAT - Force format (overrides auto-detection)

  • --verbose, -v - Enable verbose output with detailed progress

  • --help, -h - Display command help and usage information

  • --version - Show Cabriolet version

See Global Options for complete details.

Common patterns

Getting help

# General help
cabriolet --help

# Command-specific help
cabriolet extract --help

Verbose output

# Enable detailed progress
cabriolet --verbose extract archive.cab
cabriolet -v list archive.cab

Manual format override

# Force specific format
cabriolet --format chm extract archive.bin output/

Output redirection

# Save list to file
cabriolet list archive.cab > contents.txt

# Extract with progress logging
cabriolet --verbose extract archive.cab 2>&1 | tee extract.log

Exit codes

All commands use standard exit codes:

  • 0 - Success

  • 1 - General error

  • 2 - Invalid arguments

  • 3 - File not found

  • 4 - Permission denied

  • 5 - Corrupt archive

  • 6 - Unsupported format

Environment variables

Commands respect these environment variables:

  • TMPDIR - Temporary directory for operations

  • CABRIOLET_VERBOSE - Enable verbose mode (set to 1)

Next steps


Table of contents