Command-Line Interface

The Kampose CLI follows a command-based structure where you specify a command followed by command-specific options and arguments:

kampose <command> [OPTIONS] [ARGUMENTS]

When you run Kampose without a command, or with --help or -h, it displays help information. Use --version or -v to show the current version.

Commands

build

Generates documentation from .NET assemblies and XML comments.

The build command processes your .NET assemblies and XML documentation files to create API documentation using your chosen theme.

Usage

kampose build [OPTIONS] [config-file]

Arguments

Options

The --clean option deletes every existing file in the configured output directory before generation. Verify outputDirectory before using it, especially in automated builds.

The --debug option increases logging verbosity when output is redirected, such as to a log file or CI system. In normal console output, it only enables stack traces for unhandled exceptions.

Examples

# Use the default configuration file (kampose.json)
kampose build

# Use a custom configuration file
kampose build custom-config.json

# Specify a configuration file without the .json extension
kampose build my-config

# Generate documentation with debug output
kampose build my-config --debug > log.txt

# Clean the output directory before generating documentation
kampose build --clean

help

Shows help information about commands.

Use the help command to learn about Kampose's commands. When called without arguments, it lists all available commands. Specify a command name to see detailed help for that specific command.

Usage

kampose help [command]

Arguments

Options

Examples

# Show general help and list all commands
kampose help

# Show help for the build command
kampose help build

# Alternative ways to show general help
kampose --help
kampose -h

validate

Runs every validation of the build command without generating any file.

The validate command loads the configuration, theme, assemblies, XML documentation, and topics, audits the XML documentation, renders every page, bundles the theme scripts and styles, checks that every asset can be read, and verifies the referenced URLs, exactly as build does. It reports the same errors and warnings and returns the same exit codes, but creates, changes, or deletes nothing in the output directory. Use it to check documentation in pull requests or before a build.

Usage

kampose validate [OPTIONS] [config-file]

Arguments

Options

Because nothing is written, validate cannot detect failures that occur only when writing files, such as missing permissions on the output directory or a full disk. When verifyExternalLinks is enabled, it sends the same requests to external URLs as build.

Examples

# Validate using the default configuration file (kampose.json)
kampose validate

# Validate using a custom configuration file
kampose validate custom-config.json

version

Shows the current version of Kampose.

Usage

kampose version [OPTIONS]

Options

Examples

# Show version information
kampose version

# Alternative ways to show version
kampose --version
kampose -v

Global Options

Exit Codes

Kampose returns these exit codes to indicate what happened: