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:
--shellShell type for completion. If not specified, attempts to auto-detect current shell. [Choices:
zsh,bash,fish]--output, -oOutput 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, --scriptPython 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, -oOutput file path. If not specified, prints to stdout.
--format, -fOutput format for documentation. If not specified, inferred from output file extension. [Choices:
markdown,md,html,htm,rst,rest,restructuredtext]--include-hiddenInclude hidden commands in documentation. [Default:
False]--heading-levelStarting heading level for markdown format. [Default:
1]--usage-nameReplace 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:
SCRIPTPython script path with optional ':app_object' notation. [Required]
ARGSArguments to pass to the loaded application.