ubx runbook reads your XCL source files and recent apply history, then uses AI to generate a comprehensive operational runbook in Markdown or HTML. Subsequent runs with --update regenerate only changed sections.
Usage
Flags
| Flag | Description |
|---|---|
--out <file> | Write output to this file (default: stdout) |
--format <fmt> | Output format: markdown, html |
--section <name> | Generate only a specific section |
--update <file> | Diff-aware update of an existing runbook |
Requirements
RequiresUBX_AI_API_KEY environment variable or ai.api_key in workspace.xcl.
Examples
Sections
| Section | Content |
|---|---|
resources | All managed resources and their purpose |
connect | How to connect to databases, clusters, services |
scaling | How to scale resources up/down |
recovery | Recovery procedures for common failure scenarios |
alerts | Recommended alerting thresholds |
cost | Current estimated costs and optimisation recommendations |
Diff-aware update
RUNBOOK.md, no regeneration is needed. If it doesn’t match:
- Without
--section: regenerates the entire runbook - With
--section: regenerates only that section and merges it into the existing file
AI model
UsesconfigPkg.DefaultAIModel (claude-haiku-4-5). Override in workspace config.
