Getting Started
Quick start guide for new users
This guide will help you get started with Runners in just a few minutes.
Installation
Install the runners package:
If you plan to use Playwright-based runners (browser automation), install Playwright browsers:
This only needs to be done once per machine.
Your First Runner
Create a simple runner file:
Key points:
- The
"use runner"directive marks this function as a runner - Use
withPlaywright()to get browser access - Return a
RunnerResultwithname,status, and optionaldetails - Input schemas validate input at runtime
- Output schemas provide TypeScript typing for the
detailsfield - Export schemas following naming conventions for automatic discovery
Running Locally
Use the CLI to run your runner:
The CLI will:
- Discover runners from
src/**/*.tsandrunners/**/*.ts - Execute the specified runner(s)
- Print formatted results
- Exit with non-zero code on failures
Using a Config File
Create runners.config.ts:
Then run:
Running via HTTP API
Create an HTTP server:
Start your server and make a request:
Response:
Framework Integration
Nitro / Hono
Add the Nitro module to your nitro.config.ts:
Runners are automatically discovered and exposed at /api/runner/execute.
Standalone HTTP Server
See the HTTP API example for a complete standalone server.
Writing More Complex Runners
Multiple Checks
Custom Input Schema
Without Playwright
Runners don't require Playwright. You can write pure logic runners:
Next Steps
- Read Writing Runners for detailed runner authoring guide
- Check CLI Usage for advanced CLI features
- Explore Orchestration for multi-region execution
- See Examples for complete working examples