<!-- @generated by usage-cli from usage spec -->

# `usage generate markdown`

- **Usage**: `usage generate markdown <FLAGS>`
- **Aliases**: `md`
- **Effect**: read-only
- **Source code**: [`cli/src/cli/generate/markdown.rs`](https://github.com/jdx/usage/blob/main/cli/src/cli/generate/markdown.rs)

Generate markdown documentation from usage specs

## Flags

### `-f --file <FILE>`

A usage spec taken in as a file, use "-" to read from stdin

### `--view <VIEW>`

Render one spec-declared executable view

### `-m --multi`

Render each subcommand as a separate markdown file

### `--html-encode`

Escape HTML in markdown

### `--out-dir <OUT_DIR>`

**Effect**: modifies state

Output markdown files to this directory (required when using --multi)

### `--out-file <OUT_FILE>`

**Effect**: modifies state

Output file path for single-file markdown generation, or "-" for stdout (default)

### `--replace-pre-with-code-fences`

Replace `<pre>` tags with markdown code fences

### `--url-prefix <URL_PREFIX>`

Prefix to add to all URLs
