Skip to content
Author with AI

Watch Mode

Watch mode monitors a runbook.mdx file (and its scripts, checks, or template files) for changes and automatically reloads the runbook in the app.

This feature is intended for authors of runbooks.

Watch mode can be activated in two ways:

  1. Via the command line when launching the app:

    Terminal window
    runbooks --watch RUNBOOK_SOURCE
  2. Via the app menu — toggle watch mode from the application menu while a runbook is open.

  • RUNBOOK_SOURCE - A local path or remote URL pointing to a runbook.mdx file or the directory containing a runbook.mdx file. See Opening a runbook for supported remote URL formats.

When watch mode is active:

  1. Watches for changes - Monitors the runbook file and related files for any modifications
  2. Auto-reloads - Automatically refreshes the runbook in the app when changes are detected (within ~300ms)
Terminal window
runbooks open --watch /path/to/runbook

Then in your editor:

  1. Make changes to runbook.mdx
  2. Save the file
  3. See your changes instantly in the app — no manual refresh needed
  • Uses chokidar for efficient file system monitoring
  • Watches the directory containing your runbook file
  • Implements debouncing (300ms) to handle editors that save files multiple times
  • Only triggers on write and create events for your specific runbook file
  • Uses IPC (inter-process communication) events to notify the renderer process of file changes
  • When the file changes, the main process sends a file-change event via IPC
  • The renderer receives the event and automatically reloads the runbook content