Prerequisites
- Node.js
- PostgreSQL (and/or SQLite)
1. Install
Install and set up OpenWorkflow with:
npx @openworkflow/cli init
The CLI will help you set up OpenWorkflow and generate an example workflow.
2. Start a worker
npx @openworkflow/cli worker start
This starts the worker using openworkflow.config.{ts,js} and auto-loads
workflows from the configured directories (default: openworkflow/).
3. Run workflows from your app
// TypeScript
npx tsx openworkflow/hello-world.run.ts
// JavaScript
node openworkflow/hello-world.run.js
This script runs the helloWorld workflow and waits for it to complete.
This file is a temporary dev helper. Copy the code into your app (e.g., an API
route or a script) and modify it to run your workflows, then delete the file.
4. View workflows in the dashboard
View your workflows using the built-in dashboard:
npx @openworkflow/cli dashboard
The dashboard provides a UI for monitoring workflow runs, viewing step details,
and inspecting workflow state.