open
runbooks open
Section titled “runbooks open”Use runbooks open to open a runbook in the Runbooks desktop app.
runbooks open RUNBOOK_SOURCE [flags]Arguments
Section titled “Arguments”RUNBOOK_SOURCE- A local path or remote URL pointing to arunbook.mdxfile or the directory containing arunbook.mdxfile.
Local paths
Section titled “Local paths”runbooks open ./path/to/runbookrunbooks open /absolute/path/to/runbookrunbooks open ./path/to/runbook.mdxRemote sources
Section titled “Remote sources”You can open a runbook directly from a GitHub or GitLab URL without cloning the repo first:
# GitHub browser URL (copy/paste from your browser)runbooks open https://github.com/org/repo/tree/main/runbooks/setup-vpc
# GitLab browser URLrunbooks open https://gitlab.com/org/repo/-/tree/main/runbooks/setup-vpc
# OpenTofu/Terraform module source formatrunbooks open github.com/org/repo//runbooks/setup-vpc?ref=v1.0runbooks open "git::https://github.com/org/repo.git//runbooks/setup-vpc?ref=main"| Format | Example |
|--------|---------|
| GitHub browser (dir) | https://github.com/org/repo/tree/main/runbooks/setup-vpc |
| GitHub browser (file) | https://github.com/org/repo/blob/main/runbooks/setup-vpc/runbook.mdx |
| GitLab browser (dir) | https://gitlab.com/org/repo/-/tree/main/runbooks/setup-vpc |
| GitLab browser (file) | https://gitlab.com/org/repo/-/blob/main/runbooks/setup-vpc/runbook.mdx |
| OpenTofu GitHub shorthand | github.com/org/repo//path?ref=v1.0 |
| OpenTofu git::https | git::https://github.com/org/repo.git//path?ref=main |
Authentication for private repos
Section titled “Authentication for private repos”For public repositories, no authentication is needed. For private repositories, set one of the following:
- GitHub:
GITHUB_TOKENorGH_TOKENenvironment variable, or rungh auth login - GitLab:
GITLAB_TOKENenvironment variable, or runglab auth login
--watch- Enable watch mode for live-reload during authoring.--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
--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 open:
- Downloads (if remote) - If given a remote URL, downloads just the runbook directory via sparse git clone
- Launches the app - Opens the Runbooks desktop window and loads the specified runbook
- Renders the runbook - The app parses and renders the
runbook.mdxfile, providing an interactive UI for the runbook’s steps, scripts, and forms - Keeps running - The app continues running until you close the window
If the app is already running, a second invocation focuses the existing window and opens the new runbook in it.
Troubleshooting
Section titled “Troubleshooting”Runbook not found:
Make sure the path points to a valid runbook.mdx file or a directory containing one.
Authentication errors for remote runbooks: If you see “authentication required”, make sure you have set the appropriate token for the git host. See the Authentication section above.