Runbook
Make, rebuilt for the AI era
Define your project's tasks once in YAML. Humans run them from the terminal. AI assistants run them as MCP tools. Same config, same behavior, zero duplication.
One config. Two audiences.
Most teams end up with a Makefile for humans and a separate set of AI prompts that describe the same tasks in different words. Runbook eliminates that split. Define your tasks once in YAML and both audiences use the same definitions.
Human developer
- Runs tasks from the terminal
- Inspects logs and output directly
- Manages daemons with start/stop
AI assistant
- Runs tasks as MCP tools
- Reads logs and session metadata
- Controls daemons via MCP
Features
Replace your Makefile
One YAML file replaces your Makefile and your AI prompt library. No duplication between what humans type and what the AI knows.
MCP-native
Each task becomes a proper MCP tool with a full schema automatically. Works with any MCP-compatible AI client.
Shared HTTP server
Run -serve once and every AI session in every terminal connects to the same instance, sharing daemon state and logs.
Daemon management
Start, stop, check status, and tail logs for background processes. Both humans and AI manage the same running processes.
Session logging
Every execution gets a UUID session with structured logs and metadata. Query past runs from the terminal or the AI.
Multi-file configs
Put all tasks in one file, or load a whole directory. Use imports for glob-based merging. All configs are merged at startup.
Install
macOS & Linux
curl -fsSL https://runbook.dev/install.sh | bash
Windows (PowerShell)
irm https://runbook.dev/install.ps1 | iex
Installs to ~/.bin/runbook. Add ~/.bin to your PATH if needed.
Quick Start
Create a config file
Create .dev_workflow.yaml at the root of your project. Define your tasks under the tasks key.
version: "1.0"
defaults:
shell: "/bin/bash"
timeout: 300
tasks:
build:
description: "Build the project"
command: "go build -o bin/app ."
type: oneshot
dev:
description: "Start development server"
command: "npm run dev"
type: daemon
Run tasks from the terminal
Use the CLI subcommands to run tasks directly — no AI required.
# See what tasks are available
runbook list
# Run a task
runbook run build
# Run with parameters
runbook run deploy --env=staging
# Start a daemon, check status, view logs, stop it
runbook start dev
runbook status dev
runbook logs dev --lines=50
runbook stop dev
Add to your MCP client
Point your MCP client (Claude Desktop, Claude Code, or any compatible tool) at the runbook binary and your config file.
.mcp.json{
"mcpServers": {
"runbook": {
"command": "/path/to/runbook",
"args": ["-config", ".dev_workflow.yaml"]
}
}
}
Runbook discovers config automatically in the current directory if you omit -config. It looks for .dev_workflow.yaml or a .dev_workflow/ directory.
Ask your AI assistant
Your tasks are now MCP tools. Ask your AI assistant to run them by name.
Shared MCP server
By default Runbook runs in stdio mode, which works great for a single AI session. Run it in HTTP mode and multiple sessions connect to the same instance simultaneously, sharing state, daemons, and logs.
# Start once, connect from anywhere
runbook -serve -config .dev_workflow.yaml
# or on a custom port
runbook -serve -addr :9000 -config .dev_workflow.yaml
Then point each MCP client at http://localhost:8080. All sessions see the same tasks, the same running daemons, and the same log history.
Why this matters
Stdio mode starts a new process per client. HTTP mode runs one process that all clients share.
All three see the same daemon state. If one session starts dev, another can check its logs or stop it.
Task Types
Every task has a type that controls how Runbook manages its lifecycle.
Oneshot
Runs a command and returns the output when it exits. Use for build, test, lint, format. Anything with a clear beginning and end.
tasks:
test:
description: "Run tests"
command: "go test ./..."
type: oneshot
timeout: 120
Daemon
Starts a long-running background process. Runbook registers separate start, stop, status, and logs MCP tools for each daemon.
tasks:
server:
description: "Start API server"
command: "go run ./cmd/server"
type: daemon
working_directory: "/path/to/project"
Parameters
Tasks can accept parameters using Go template syntax. The AI assistant fills in the values automatically based on the parameter schema you define.
tasks:
deploy:
description: "Deploy to an environment"
command: "scripts/deploy.sh --env {{.env}} --version {{.version}}"
type: oneshot
parameters:
env:
type: string
required: true
description: "Target environment (staging, production)"
version:
type: string
required: false
description: "Version to deploy"
default: "latest"
Each parameter becomes a field in the MCP tool schema, with its description shown to the AI. Required parameters must be provided; optional ones fall back to default.
You can also expose the task's working directory as a parameter using expose_working_directory: true. Useful when the same task runs against multiple directories.
Workflows
Workflows run multiple tasks in sequence with a single MCP tool call. Steps share optional parameters via template substitution, and individual steps can be marked continue_on_failure to keep the pipeline running even if they fail.
workflows:
ci:
description: "Full CI pipeline"
steps:
- task: lint
- task: test
- task: build
continue_on_failure: true
Runbook exposes each workflow as a single MCP tool named workflow_{name}. The AI can run your entire CI pipeline with one call.
Config Reference
Top-level fields
| Field | Description |
|---|---|
version | Config version. Use "1.0". |
imports | List of glob patterns to merge additional config files. All merged at startup; task names must be unique across files. |
defaults | Default timeout (seconds), shell, and env applied to every task unless overridden. |
tasks | Map of named tasks. Each key becomes an MCP tool name. |
workflows | Map of named multi-step workflows that chain tasks sequentially. |
task_groups | Named collections of tasks for organizational grouping. |
prompts | Templated prompts exposed as MCP prompt resources to AI assistants. |
resources | Custom MCP resources with inline content or a file path. |
Task fields
| Field | Description |
|---|---|
description | Human-readable description shown to the AI in the tool schema. |
command | Shell command to run. Supports {{.param}} Go template substitution. |
type | oneshot runs and exits. daemon is a long-running background process. |
working_directory | Set a fixed working directory for the command. |
expose_working_directory | If true, adds a working_directory parameter to the MCP tool so the caller can set it at runtime. |
env | Map of environment variables set for this task only. |
timeout | Timeout in seconds. Overrides the value in defaults. |
shell | Shell binary used to run the command (e.g. /bin/zsh). Overrides the value in defaults. |
parameters | Named parameters with type, required, description, and optional default. |
depends_on | List of task names that must complete successfully before this task runs. |
CLI subcommands
| Command | Description |
|---|---|
runbook list | List all available tasks and workflows with their types, descriptions, and parameters. |
runbook run <task> [--param=value...] | Run a oneshot task or workflow. Parameters passed as --key=value flags. |
runbook start <task> [--param=value...] | Start a daemon task in the background. |
runbook stop <task> | Stop a running daemon. |
runbook status <task> | Show whether a daemon is running and its PID. |
runbook logs <task> [--lines=N] [--filter=REGEX] [--session=ID] | Print task log output. Defaults to the latest session. |
All subcommands accept --config=<path> to specify a config file or directory.
Server flags
| Flag | Description |
|---|---|
-config <path> | Path to a config file or directory. If omitted, Runbook looks for .dev_workflow.yaml or .dev_workflow/ in the current directory. |
-init | Create a minimal .dev_workflow.yaml in the current directory and exit. |
-serve | Run as a standalone HTTP server instead of stdio MCP mode. |
-addr <addr> | Listen address for HTTP mode (default: :8080). |