Skip to content
reaatechREAATECH

@reaatech/agent-runbook-cli

npm v0.1.0

Provides a CLI and programmatic interface to analyze service repositories and generate operator runbooks using LLM-based orchestration. It also functions as a central barrel package that re-exports the entire `@reaatech/agent-runbook` ecosystem and includes an MCP server mode for integration with AI coding agents.

@reaatech/agent-runbook-cli

npm version License: MIT CI

CLI and orchestrator for the Agent Runbook Generator. The primary entry point for generating operator runbooks from service repositories using AI analysis, plus a convenience barrel that re-exports all public APIs from the @reaatech/agent-runbook-* ecosystem.

Installation

terminal
npm install -g @reaatech/agent-runbook-cli
# or
pnpm add @reaatech/agent-runbook-cli

Feature Overview

  • 5 CLI commandsanalyze, generate, validate, export, serve
  • Multi-provider LLM support — Claude, OpenAI, Gemini, or mock (no-API) mode
  • Multi-format output — Markdown, HTML
  • MCP server modeserve command starts the MCP server for AI agent integration
  • Convenience barrel — re-exports all public APIs from the 13 other @reaatech/agent-runbook-* packages
  • CI integration — validation gate with configurable thresholds for CI/CD pipelines

CLI Usage

Analyze

terminal
agent-runbook-generator analyze /path/to/repo
agent-runbook-generator analyze /path/to/repo --json --depth 5

Scans a repository and outputs analysis in human-readable or JSON format.

Generate

terminal
agent-runbook-generator generate /path/to/repo --output runbook.md
agent-runbook-generator generate /path/to/repo --output runbook.md --provider claude --model claude-opus-4-5
agent-runbook-generator generate /path/to/repo --output runbook.md --provider mock

Generates a complete operator runbook with configurable sections and provider.

Validate

terminal
agent-runbook-generator validate runbook.md
agent-runbook-generator validate runbook.md --ci --completeness-threshold 0.8

Validates a runbook for completeness, accuracy, and cross-references. --ci flag enables JSON output with exit codes for pipeline use.

Export

terminal
agent-runbook-generator export runbook.md --format html --output runbook.html

Converts a runbook between formats (Markdown, HTML, PDF).

Serve

terminal
agent-runbook-generator serve --port 3000

Starts the MCP server for integration with AI coding agents.

Programmatic API

typescript
import { generateRunbook } from "@reaatech/agent-runbook-cli";
 
const runbook = await generateRunbook({
  path: "/path/to/repo",
  output: "runbook.md",
  format: "markdown",
  provider: "claude",
  model: "claude-opus-4-5-20260506",
  sections: ["alerts", "dashboards", "failure-modes", "rollback", "incident-response"],
});

This package re-exports all public APIs from the following packages as a convenience: @reaatech/agent-runbook (core types + utils), @reaatech/agent-runbook-analyzer, @reaatech/agent-runbook-alerts, @reaatech/agent-runbook-dashboards, @reaatech/agent-runbook-failure-modes, @reaatech/agent-runbook-health-checks, @reaatech/agent-runbook-incident, @reaatech/agent-runbook-rollback, @reaatech/agent-runbook-runbook, @reaatech/agent-runbook-service-map, @reaatech/agent-runbook-agent, @reaatech/agent-runbook-mcp, @reaatech/agent-runbook-observability.

License

MIT