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:
| Group | Command | Use it for |
|---|---|---|
| Primary Usage | n8nac env | Workspace environments: remote n8n URL or local managed instance, project, workflowsPath, active environment |
| Workspace Inspection | n8nac workspace | V4 workspace snapshot |
| Managed Local Instances | n8n-manager | Local managed instances, Docker lifecycle, tunnels, machine-local state |
How It Works
- Create or select an n8n environment for the workspace.
- Pull or create workflow files in that environment's workflowsPath.
- Ask the Agent to build, refactor, explain, validate, or fix workflows.
- Push intentionally, provision credentials, activate, run, and inspect executions.
- Commit workflow files and workspace-safe
n8nac-config.jsonchanges.
Choose Your Entry Point
| If you use... | Start here |
|---|---|
| VS Code / Cursor | VS Code Extension - visual workflow workspace and integrated Agent Workbench |
| Terminal / CI | CLI - n8nac env, sync, validation, AI context, automation |
| Managed local instances | n8n-manager - Docker instances, tunnels, local machine state |
| Claude Code / Claude Desktop | Claude Plugin - n8n skills and MCP-backed workflow work |
| Generic coding agents | Skills Reference - portable n8n skills |
| OpenClaw | OpenClaw 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
- Getting Started - first workspace setup
- Usage Guides - VS Code, CLI, Claude, OpenClaw, n8n-manager, and TypeScript workflows
- Troubleshooting - common issues and fixes
- Community - GitHub Discussions, issues, and contributions
- Contribution - development setup and internals