# CLI Command Reference This is a plain-text reference of all available commands. ## clidoc A .NET global tool that generates beautiful static documentation websites for CLI tools built with System.CommandLine **Options:** - `--help, -h` (string) Show help and usage information - `--version` (string) Show version information **Subcommands:** `init`, `generate` --- ## clidoc generate Generate static documentation site from an assembly and optional metadata **Examples:** Generate site with default settings: ``` clidoc generate --assembly MyApp.dll ``` Specify metadata file and output directory: ``` clidoc generate --assembly MyApp.dll --metadata cli-docs.yaml --output docs ``` Override site title: ``` clidoc generate --assembly MyApp.dll --title "My CLI Tool" ``` Specify entry point and base URL: ``` clidoc generate --assembly MyApp.dll --entry-type MyApp.Program --base-url https://docs.example.com ``` Skip llms.txt generation: ``` clidoc generate --assembly MyApp.dll --no-llms-txt ``` **Subcommands:** `commands`, `docs` --- ## clidoc generate commands Extract commands.json from a System.CommandLine assembly or project. **Options:** - `--assembly, -a` (string) Path to the compiled CLI assembly (.dll) to reflect over. - `--project, -p` (string) Path to a .csproj file; clidoc will build it and reflect over the output. - `--entry-type, -t` (string) Fully-qualified type name with a static method returning RootCommand. - `--root-name` (string) Override the root command's name in the emitted JSON. Defaults to the csproj's (via --project). - `--output, -o` (string) Output path for the generated commands.json. - `--pretty` (boolean) Pretty-print the JSON (default: true). --- ## clidoc generate docs Render a static documentation site from commands.json. **Options:** - `--commands-json, -c` (string) Path to commands.json. Defaults to ./commands.json if it exists. - `--metadata, -m` (string) Path to cli-docs.yaml metadata file. Defaults to ./cli-docs.yaml if it exists. - `--output, -o` (string) Output directory for generated site. - `--title` (string) Site title (overrides metadata). - `--root-name` (string) Override the root command's name (affects breadcrumbs, tree root, and subcommand full names). - `--base-url` (string) Base URL for canonical links. - `--no-llms-txt` (boolean) Skip llms.txt generation. - `--no-commands-json` (boolean) Don't copy commands.json into the output directory (and hide its nav link). --- ## clidoc init Generate a cli-docs.yaml scaffold from an assembly **Options:** - `--commands-json, -c` (string) Path to commands.json. Defaults to ./commands.json if it exists. - `--output, -o` (string) Output file path. - `--root-name` (string) Override the root command's name used as the YAML map key. **Examples:** Generate metadata file for a CLI tool: ``` clidoc init --assembly MyApp.dll ``` Specify output file location: ``` clidoc init --assembly MyApp.dll --output docs/cli-docs.yaml ``` Specify entry point type explicitly: ``` clidoc init --assembly MyApp.dll --entry-type MyApp.Program ``` Override root command name: ``` clidoc init --assembly MyApp.dll --root-name myapp ``` ---