Heal

Commands reference

CLI usage, examples, and all options.

Heal CLI commands

Usage

heal test [globs...]          Run tests
heal autopilot [request]      Run the Autopilot agent to create/fix tests
heal init                     Initialize a Heal repository

Examples

# Run all tests
heal test

# Run a specific test
heal test "tests/login.spec.ts"

# Run tests matching a glob
heal test "tests/**/*.spec.ts"

# Run 4 tests in parallel
heal test --concurrency 4

# Run in headless mode
heal test --headless true

# Retry failing tests 3 times
heal test --retries 3

# Start autopilot in interactive mode
heal autopilot

# Run autopilot with a request
heal autopilot "fix login test"

# Scaffold project structure
heal init

Global options

-v, --verbose              Show all internal logs
--version                  Show version
-h, --help                 Show this help

heal test

heal test runs your Playwright tests with Heal’s self-healing layer enabled.

  • Uses your existing Playwright test files with heal SDK calls.
  • Applies retry logic and smart waiting based on the options above.
  • Writes and reads Heal’s cache to make repeated runs faster and more stable.

Common patterns:

  • Filter tests by glob: heal test "tests/**/*.spec.ts".
  • Speed up runs in CI with --concurrency and --headless true.
  • Reduce flakes with --retries and smart waiting flags.

For a deeper walkthrough of running and tuning tests, see Running tests.

Options:

--concurrency <n>          Parallel test count (default: 1)
--timeout <ms>             Per-test timeout (default: 30000)
--headless <bool>          Headless browser mode
--retries <n>              Retry attempts on failure (default: 2)
--wait-before-ai <ms>      Wait before AI calls (default: 0)
--wait-before-cache <ms>   Wait before cache lookup (default: 300)
--smart-wait-timeout <ms>  Smart wait before AI (default: 7000)
--entry-point <url>        Override test entry point URL
--worker-heap <mb>         Worker max old-gen heap size
--worker-young <mb>        Worker max young-gen heap size

heal autopilot

heal autopilot runs the Autopilot agent to perform coding tasks around your tests and project.

  • Interactive mode (no arguments): opens a prompt where you can iteratively ask the agent to fix or add tests.
  • Request mode (heal autopilot "fix login test"): runs a single-shot task and exits.
  • --yolo flag: runs autopilot without asking interactive questions, ideal for non-interactive or batch workflows.

Typical uses:

  • Generate new tests for an existing flow.
  • Fix broken tests after a UI change.
  • Refactor or modernize existing test suites.

For a full guide to how autopilot creates tests (including --yolo behavior), see Creating tests.

heal init

heal init initializes a Heal-aware repository structure in your current project.

heal init

To learn how the CLI fits into the rest of the ecosystem (SDK, platform, and more), start from the main CLI reference and the SDK overview.

On this page