A command-line tool for authoring, validating, and inspecting PLAYBOOK.md files — multi-step AI workflows written in plain markdown.
Built with the Charm ecosystem for a polished terminal experience.
go install github.com/PLAYBOOK-MD/playbook-cli@latestOr build from source:
git clone https://github.com/PLAYBOOK-MD/playbook-cli.git
cd playbook-cli
go build -o playbook .# Validate a single file
playbook validate my-workflow.playbook.md
# Validate multiple files with a glob
playbook validate *.playbook.md
# JSON output for CI pipelines
playbook validate --json *.playbook.md
# Silent mode (exit code only)
playbook validate --quiet *.playbook.mdExit code 0 means all files are valid. Exit code 1 means one or more files have errors.
# Pretty-printed AST with styled header
playbook parse my-workflow.playbook.md
# Raw JSON output
playbook parse --json my-workflow.playbook.md# Styled summary card
playbook summary my-workflow.playbook.md
# "info" is an alias
playbook info my-workflow.playbook.mdDisplays title, description, step list, input/step counts, and feature badges (branching, elicitation, tool calls).
# Output to stdout
playbook convert my-workflow.playbook.md --to json
# Write to a file
playbook convert my-workflow.playbook.md --to json --output workflow.json# Interactive form
playbook init
# Specify output path
playbook init --output my-new-workflow.playbook.mdWalks you through an interactive form to set title, description, step count, and optional features (inputs, branching, artifacts), then generates a .playbook.md file.
playbook tui [directory]Interactive terminal browser for .playbook.md files. Browse, inspect, and navigate step-by-step using Bubble Tea.
- File browser with search/filter
- Playbook detail cards with validation status
- Step-by-step viewer with directive highlighting
- Keyboard-driven: arrows to navigate, enter to select,
sfor steps,vfor validation,jfor JSON
# Auto-detect coding tool
playbook setup
# Specify tool directly
playbook setup --tool claude-code
playbook setup --tool codex
# Preview without writing files
playbook setup --dry-runGenerates MCP server config and agent instruction files for your coding tool. Supports Claude Code, Codex, opencode, Continue, Cline, and Aider.
Requires Go 1.22+.
This CLI depends on the Go SDK at ../playbook-integrations/packages/go/. The go.mod file uses a replace directive to reference it locally:
replace github.com/PLAYBOOK-MD/playbook-integrations/packages/go => ../playbook-integrations/packages/go
To build:
go mod tidy
go build -o playbook .- Cobra - Command structure
- Lip Gloss - Styled terminal output
- Glamour - Markdown rendering
- Huh - Interactive forms
- Charm Log - Structured logging
MIT