Skip to main content

Installation

npm install @workflow/nuxt

Usage

Add the workflow module to your Nuxt configuration:
nuxt.config.ts
export default defineNuxtConfig({
  modules: ['@workflow/nuxt'],
});

API

Module Options

Configure the module via the workflow key in your Nuxt config:
nuxt.config.ts
export default defineNuxtConfig({
  modules: ['@workflow/nuxt'],
  workflow: {
    typescriptPlugin: true,
  },
});
workflow.typescriptPlugin
boolean
Enable TypeScript plugin for workflow.Default: true

Configuration Examples

Basic Configuration

nuxt.config.ts
export default defineNuxtConfig({
  modules: ['@workflow/nuxt'],
});

Disable TypeScript Plugin

nuxt.config.ts
export default defineNuxtConfig({
  modules: ['@workflow/nuxt'],
  workflow: {
    typescriptPlugin: false,
  },
});

How It Works

The Nuxt module acts as a wrapper around the Nitro module (@workflow/nitro):
  1. Module Setup: Adds @workflow/nitro to nuxt.options.nitro.modules
  2. Option Passthrough: Forwards typescriptPlugin option to Nitro configuration
  3. Nitro Integration: All workflow functionality is provided by the underlying Nitro module
Since Nuxt uses Nitro as its server engine, this module simply ensures the Nitro workflow module is properly configured.

Module Configuration

The module is defined with:

Nitro Integration

All workflow functionality comes from @workflow/nitro, including:
  • Workflow discovery and building
  • Route handler generation
  • Development HMR
  • Vercel deployment support
Refer to the @workflow/nitro documentation for details on:
  • Additional options (via nuxt.options.nitro.workflow)
  • Generated routes
  • Build process
  • Deployment

Advanced Configuration

You can access Nitro-specific options directly:
nuxt.config.ts
export default defineNuxtConfig({
  modules: ['@workflow/nuxt'],
  workflow: {
    typescriptPlugin: true,
  },
  nitro: {
    workflow: {
      dirs: ['server/workflows'],
      runtime: 'nodejs22.x',
    },
  },
});
Available Nitro workflow options:
  • dirs - Directories to scan for workflows
  • typescriptPlugin - Enable TypeScript plugin
  • runtime - Node.js runtime version for Vercel
See @workflow/nitro ModuleOptions for full details.

Generated Routes

The module inherits all routes from @workflow/nitro:
  • POST /.well-known/workflow/v1/flow
  • POST /.well-known/workflow/v1/step
  • POST /.well-known/workflow/v1/webhook/:token
  • GET /.well-known/workflow/v1/manifest.json (when WORKFLOW_PUBLIC_MANIFEST=1)

Build docs developers (and LLMs) love