serve
runbooks serve
Section titled “runbooks serve”Use runbooks serve to start the backend API server without starting the frontend server or opening the browser.
This command is intended for developers of the Runbooks tool itself.
runbooks serve RUNBOOK_SOURCE [flags]Arguments
Section titled “Arguments”RUNBOOK_SOURCE- A local path or remote URL pointing to arunbook.mdxfile, the directory containing arunbook.mdxfile, or an OpenTofu/Terraform module directory. See runbooks open for supported remote URL formats and OpenTofu/Terraform module auto-detection.
--working-dir <path>- Base directory for script execution and file generation (default: current directory)- All relative paths are resolved from this directory
- Can be absolute or relative to current directory
- Use
--working-dir=::tmpfor a temporary directory (automatically cleaned up on exit), useful for isolated testing or sandboxed execution
--output-path <path>- Directory where generated files will be written (default:generated)- Resolved relative to the working directory
--tf-runbook <keyword-or-path>- Select a built-in template or provide a local custom runbook for OpenTofu/Terraform modules. Remote URLs are not supported. See runbooks open for available templates and details.--no-telemetry- Disable anonymous telemetry. Can also be set viaRUNBOOKS_TELEMETRY_DISABLE=1environment variable.
What it does
Section titled “What it does”When you run runbooks serve:
- Starts the Backend Server - Launches a Go-based HTTP server on port 7825
- Serves the API - Provides REST endpoints for the frontend to call
- Does NOT Open Browser - You must manually navigate to
http://localhost:7825or run the frontend separately
Development workflow
Section titled “Development workflow”Here’s a typical development workflow:
-
Start the backend:
Terminal window runbooks serve testdata/demo-runbookOr if you want to easily re-compile the backend:
Terminal window go run main.go serve testdata/demo-runbook -
In another terminal, start the frontend:
Terminal window cd webbun dev -
Open your browser to
http://localhost:5173(Vite’s port) -
Make changes to:
- React code in
/web/src- hot reloads automatically - Go code - restart the
servecommand - Runbook files - refresh the browser
- React code in