# CLI Reference

The `cyclopts` package includes a command-line interface for various development tasks.

## cyclopts --install-completion

    cyclopts --install-completion [OPTIONS]

Register shell-completion for the cyclopts CLI itself.

Parameters:

`--shell`

  Shell type for completion. If not specified, attempts to auto-detect current shell. [Choices: `zsh`, `bash`, `fish`]

`--output, -o`

  Output path for the completion script. If not specified, uses shell-specific default.

## cyclopts generate-docs

    cyclopts generate-docs [OPTIONS] SCRIPT [ARGS]

Generate documentation for a Cyclopts application.

Parameters:

`SCRIPT, --script`

  Python script path, optionally with `':app_object'` notation to specify the App object. If not specified, will search for App objects in the script's global namespace. [Required]

`OUTPUT, --output, -o`

  Output file path. If not specified, prints to stdout.

`--format, -f`

  Output format for documentation. If not specified, inferred from output file extension. [Choices: `markdown`, `md`, `html`, `htm`, `rst`, `rest`, `restructuredtext`]

`--include-hidden`

  Include hidden commands in documentation. [Default: `False`]

`--heading-level`

  Starting heading level for markdown format. [Default: `1`]

`--usage-name`

  Replace the app name shown in `Usage:` lines with this string. For example, `"uv run cli"` for an app whose runtime name is `"cli"`. Headings and anchors are unaffected. Default is None.

## cyclopts run

    cyclopts run SCRIPT [ARGS...]

Run a Cyclopts application from a Python script with dynamic shell completion.

All arguments after the script path are passed to the loaded application.

Shell completion is available. Run once to install (persistent): `cyclopts --install-completion`

Arguments:

`SCRIPT`

  Python script path with optional ':app_object' notation. [Required]

`ARGS`

  Arguments to pass to the loaded application.