Skip to main content

n8n-as-code

n8n-as-code is the n8n workspace for AI agents. It lets you build, edit, sync, deploy, test, and debug workflows from local files while staying connected to real n8n instances.

The product model is intentionally small:

GroupCommandUse it for
Primary Usagen8nac envWorkspace environments: remote n8n URL or local managed instance, project, workflowsPath, active environment
Workspace Inspectionn8nac workspaceV4 workspace snapshot
Managed Local Instancesn8n-managerLocal managed instances, Docker lifecycle, tunnels, machine-local state

How It Works

  1. Create or select an n8n environment for the workspace.
  2. Pull or create workflow files in that environment's workflowsPath.
  3. Ask the Agent to build, refactor, explain, validate, or fix workflows.
  4. Push intentionally, provision credentials, activate, run, and inspect executions.
  5. Commit workflow files and workspace-safe n8nac-config.json changes.

Choose Your Entry Point

If you use...Start here
VS Code / CursorVS Code Extension - visual workflow workspace and integrated Agent Workbench
Terminal / CICLI - n8nac env, sync, validation, AI context, automation
Managed local instancesn8n-manager - Docker instances, tunnels, local machine state
Claude Code / Claude DesktopClaude Plugin - n8n skills and MCP-backed workflow work
Generic coding agentsSkills Reference - portable n8n skills
OpenClawOpenClaw Plugin - portable n8n skills inside OpenClaw

Quick Start

VS Code / Cursor

Install the extension, open the n8n view, run n8n: Configure, and create an n8n environment.

CLI

n8nac env add Dev --base-url https://n8n.example.com --workflows-path workflows/dev
n8nac env auth set Dev --api-key-stdin
n8nac env use Dev
n8nac update-ai

Then sync explicitly:

n8nac list
n8nac pull <workflow-id>
n8nac push workflows/dev/my-workflow.workflow.ts --verify

Documentation