Skip to Content

next-workflow-builder

DevKit AI Builder Template DocumentationMarketplace
CTRL K
Demo
CTRL K
  • DevKit 
  • AI Builder Template 
    • Introduction
    • Getting Started
    • Configuration
    • Plugins
      • Overview
      • HTTP Request
      • Condition
      • Loop
      • Merge
      • Database Query
      • Run Workflow
      • Run Workflows in Sequence
      • Switch
    • Creating Plugins
    • API Reference
    • CLI Reference
    • Components
    • Database
    • Authentication
    • Deployment
    • Architecture
    • Contributing
    • MCP Server
  • Marketplace
  • Introduction
  • Getting Started
  • Configuration
  • Plugins
    • Overview
    • HTTP Request
    • Condition
    • Loop
    • Merge
    • Database Query
    • Run Workflow
    • Run Workflows in Sequence
    • Switch
  • Creating Plugins
  • API Reference
  • CLI Reference
  • Components
  • Database
  • Authentication
  • Deployment
  • Architecture
  • Contributing
  • MCP Server

On This Page

  • Installation
  • Commands
  • nwb discover-plugins
  • nwb create-plugin
  • nwb migrate-prod
  • Help
Question? Give us feedback Edit this page 
DocumentationCLI Reference

CLI Reference

The nwb (Next Workflow Builder) CLI provides commands for plugin management and database operations.

Installation

The CLI is included with the next-workflow-builder package. It’s available as:

npx nwb <command>

Or add scripts to your package.json:

{ "scripts": { "discover-plugins": "nwb discover-plugins", "create-plugin": "nwb create-plugin", "db:migrate:prod": "nwb migrate-prod" } }

Commands

nwb discover-plugins

Scans the plugins/ directory and generates all registry files.

npx nwb discover-plugins

What it does:

  1. Scaffolds plugins/index.ts if it doesn’t exist (never overwrites an existing file)
  2. Imports plugins/index.ts to populate the integration registry (both local and npm plugins)
  3. Generates the following files:
    • lib/types/integration.ts - Union type of all integration type slugs
    • lib/step-registry.ts - Maps action IDs to lazy step import functions
    • lib/output-display-configs.ts - Maps action IDs to display configurations
    • lib/codegen-registry.ts - Code generation templates

When to run:

  • Before next dev and next build (recommended in your scripts)
  • After modifying a plugin’s actions, routes, or output configs
  • Not needed just for adding/removing plugins — edit plugins/index.ts directly

Typical setup:

{ "scripts": { "dev": "nwb discover-plugins && next dev", "build": "nwb discover-plugins && next build" } }

nwb create-plugin

Interactive scaffolding tool to create a new plugin from templates.

npx nwb create-plugin

Prompts you for:

  • Plugin name / slug
  • Display label
  • Description
  • Initial actions

Creates a complete plugin directory with all required files.

nwb migrate-prod

Run database migrations for production deployments (e.g. on Vercel).

npx nwb migrate-prod

Reads the database URL from DATABASE_URL and applies any pending schema migrations.

Help

npx nwb --help
Last updated on March 12, 2026
API ReferenceComponents

© 2026 All rights reserved.

Product by David Sanchez