N8n As Code
Give your AI agent n8n superpowers. 537 nodes with full schemas, 7,700+ templates, Git-like sync, and TypeScript workflows.
Ask AI about N8n As Code
Powered by Claude Β· Grounded in docs
I know everything about N8n As Code. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
n8n-as-code
The n8n IDE for AI agents.
VS Code / Cursor Agent Β· n8n-manager Β· GitOps Β· AI Skills Β· TypeScript Workflows
Build, edit, deploy, and debug n8n workflows from your editor with an agent that has live n8n context.
V2 ships an integrated VS Code/Cursor Agent, real instance management through n8n-manager, and the same grounded n8n knowledge across CLI, MCP, Claude Code, and OpenClaw.
Documentation Β· Getting Started Β· VS Code Guide Β· n8n-manager Guide
β n8n version compatibility β The node schema bundled with n8n-as-code is built against the latest stable release of n8n. For best results, keep your n8n instance up to date. Using an outdated instance may cause generated workflows to reference node type-versions not yet supported by your instance, which n8n renders as broken nodes in the canvas.
Independent project β n8n-as-code is an independent community project and is not affiliated with, endorsed by, or sponsored by n8n.
Using V1? V2 is now the default release line. V1 users can keep using the legacy branch and packages: V1 branch Β· CLI:
npx --yes n8nac@v1 <command>Β· Claude Code:/plugin marketplace add https://github.com/EtienneLescot/n8n-as-code#v1.
Quick Start
Choose the entry point that matches where you want to work with n8n.
VS Code / Cursor
This is the recommended path for day-to-day workflow work. The extension adds the VS Code-specific experience: an n8n sidebar, an integrated workflow UI, and an integrated agent.
Install the extension from the VS Code Marketplace or Open VSX, open the n8n view, then click on Configure. The setup is graphical: choose a managed local n8n instance, connect an existing instance, or stay in generation-only mode.
Claude Code
Use the Claude Code plugin when you want Claude to create, update, validate, or debug n8n workflows with the bundled n8n skills.
/plugin marketplace add https://github.com/EtienneLescot/n8n-as-code
/plugin install n8n-as-code@n8nac-marketplace
Generic Agent Skills
For OpenCode, Codex, Hermes, OpenClaw, or any other AI agent, install the n8n-as-code skills from the repository skills directory:
https://github.com/EtienneLescot/n8n-as-code/tree/main/skills
If your agent asks for explicit skill paths, use skills/n8n-manager and skills/n8n-architect. The same skill content is also packaged on npm as @n8n-as-code/skills for n8nac and runtime usage.
Once the skills are available, ask your agent to initialize n8n-as-code in the workspace. The agent can then run the required setup itself: generate AGENTS.md, configure the workspace, and use the local n8n context.
Agents can then use commands such as:
npx --yes n8nac skills search "send slack message when google sheet is updated"
npx --yes n8nac skills node-info slack
npx --yes n8nac skills validate workflows/my-workflow.workflow.ts
CLI / CI
Use the CLI in scripts and CI when you need repeatable validation, sync, or deployment checks without opening an editor.
npx --yes n8nac skills validate workflows/my-workflow.workflow.ts
npx --yes n8nac push workflows/instance/project/my-workflow.workflow.ts --verify
npx --yes n8nac verify <workflow-id>
CLI guide Β· n8n-manager guide
Then tell your agent what you want to do with n8n. It can use the current workflow, selected node, n8n instance, and workspace context to create flows, edit nodes, search docs and templates, push changes, provision missing credentials, run supported workflows, and inspect executions.
What changed in V2
- Integrated VS Code Agent β the extension now includes an Agent Workbench that understands the selected workflow, selected node, active instance, project, and local workspace.
n8n-managerruntime foundation β instance registration, API keys, managed local runtimes, project selection, credential readiness, deployment, execution, and inspection use the same runtime layer across surfaces.- Split runtime/workspace config β
n8n-managerstores global instances and API keys, whilen8nac-config.jsonstores repository-local overrides such as pinned instance, project, and sync folder. - One grounded workflow loop β local files, n8n schema knowledge, docs, templates, validation, push/pull, credential setup, activation, test execution, and execution inspection are available from the same product flow.
Prereleases
Stable docs and examples use npm latest and the default plugin marketplace branch. To test prerelease builds from next, keep every entry point on the same prerelease line:
/plugin marketplace add https://github.com/EtienneLescot/n8n-as-code#next
/plugin install n8n-as-code@n8nac-marketplace
npx --yes n8nac@next <command>
npx --yes @n8n-as-code/n8n-manager@next <command>
openclaw plugins install @n8n-as-code/n8nac@next
Do not mix the next Claude/OpenClaw plugin payload with n8nac@latest: prerelease skills may rely on commands that are not available in the stable CLI yet.
MCP Clients (Claude Desktop) :
If you are using Claude Desktop or another MCP client, point it at the local MCP server with:
{
"mcpServers": {
"n8n-as-code": {
"command": "npx",
"args": ["--yes", "n8nac", "skills", "mcp"]
}
}
}
Initialize your workspace first so it has both the sync config and AI context it needs:
n8n-manager auth set --url <url> --api-key-stdin
n8n-manager projects select <project-id-or-name>
npx --yes n8nac workspace set-sync-folder workflows
npx --yes n8nac update-ai
AI Skills: What Your Agent Gets
Not a bridge. Not a proxy. A Skill.
Pre-built knowledge that your AI agent carries with it β works in Cursor, Cline, Windsurf, Copilot, Claude, or any coding agent.
The skills layer gives agents a grounded n8n map: what nodes exist, which parameters they accept, how workflows connect, which examples are relevant, and which operations are safe before pushing to a real instance.
| 537 n8n nodes | 433 core + 104 AI/LangChain nodes |
| 100% schema coverage | 10,209 properties + 17,155 option values grounded in the real schema |
| 1,243 documentation pages | 93% of nodes have linked docs for integrations, triggers, AI, hosting, and code |
| 7,702 workflow templates | Searchable community library with on-demand workflow downloads |
| 104 AI/LangChain nodes | Agents, chains, LLMs, tools, memory, vector stores, and retrievers |
| 170 pages with code examples | Ready-to-use snippets extracted from official n8n docs |
| Built-in validation | Schema validation catches errors before you push to production |
# Your agent can search nodes, docs, and templates instantly
npx --yes n8nac skills search "send slack message when google sheet is updated"
npx --yes n8nac skills node-info slack # Full schema + docs + examples
npx --yes n8nac skills examples search "AI agent" # Search 7,702 templates
npx --yes n8nac skills validate workflow.json # Validate before deploying
Claude Code uses the same n8n-manager and n8nac CLIs and ships the n8n-manager and n8n-architect skills through the n8n-as-code plugin, so natural-language workflow work and terminal automation stay aligned around the same runtime and n8n knowledge.
Community Workflow Sources
n8n-as-code ships a searchable index of public community workflow metadata and downloads the workflow JSON on demand when an agent or user explicitly requests it.
The current community workflow catalog is built from nusquama/n8nworkflows.xyz. As in the upstream archive, each workflow keeps its original license and users should refer to the original workflow metadata and source page for license details. The repository structure and indexing logic in n8n-as-code remain licensed under the MIT License.
Thanks to the n8nworkflows.xyz project for maintaining the public archive that makes this search experience possible.
π GitOps for n8n
Manage your entire workflow lifecycle β pull, edit, push, resolve conflicts, version with Git.
pull
ββββββββββββ βββββββββββββ βββββββββββββ
β n8n β β Local β
β Instance β ββββββββββββ βΊβ Files β
ββββββββββββ push βββββββββββββ
β
git commit
β
ββββββΌβββββ
βGit Repo β
βββββββββββ
n8n-manager auth set --url <url> --api-key-stdin
n8n-manager projects select <project-id-or-name>
npx n8nac workspace set-sync-folder workflows
npx n8nac list # See sync status at a glance
npx n8nac pull <id> # Pull remote β local
npx n8nac push my-workflow.workflow.ts # Push local β remote
npx n8nac resolve <id> --mode keep-current # Explicit conflict resolution
3-way merge conflict detection Β· Multi-instance support
π TypeScript Workflows
Convert n8n JSON workflows to clean, type-safe TypeScript with decorators.
Bidirectional β convert back to JSON anytime.
import { workflow, node, links } from '@n8n-as-code/transformer';
@workflow({ id: 'abc123', name: 'Slack Notifier', active: true })
export class SlackNotifierWorkflow {
@node()
Trigger = {
type: 'n8n-nodes-base.webhook',
parameters: { path: '/notify', method: 'POST' },
position: [250, 300]
};
@node()
Slack = {
type: 'n8n-nodes-base.slack',
parameters: {
resource: 'message',
operation: 'post',
channel: '#alerts',
text: '={{ $json.message }}'
},
position: [450, 300]
};
@links([{ from: 'Trigger', to: 'Slack' }])
connections = {};
}
n8nac convert workflow.json --format typescript # JSON β TypeScript
n8nac convert-batch workflows/ --format typescript # Bulk convert to TypeScript
n8nac pull <id> > workflow.json && n8nac convert workflow.json --format typescript # Pull then convert to TypeScript
Why TypeScript? β Better diffs in Git Β· Better readability in editors Β· Much easier for AI to read & edit
VS Code / Cursor Extension
The fastest V2 path: editor sidebar, live n8n context, integrated Agent Workbench, embedded canvas, and one-click sync.
- Install from VS Code Marketplace or OpenVSX Marketplace.
- Open a folder or
.code-workspace, then click the n8n icon in the Activity Bar. - Run n8n: Configure to create a managed local n8n instance or connect an existing instance through
n8n-manager. - Save the workspace context, pull or create workflows, then use the built-in Agent to work with the selected workflow and node.
You can keep multiple global n8n-manager instances and pin a workspace to a specific instance/project when needed.
What you get:
- Agent Workbench β ask for workflow changes with live workflow, selected node, instance, and workspace context.
- Workflow sidebar β browse local and remote workflows with explicit sync status.
- Embedded n8n canvas β inspect the visual workflow next to the source file.
- One-click push/pull β sync workflows without leaving the editor.
- Runtime loop β provision missing credentials, activate, run supported workflows, and inspect executions through
n8n-manager. - Conflict resolution UI β resolve real local/remote divergence intentionally.
Packages
| Package | What it does | Install |
|---|---|---|
| VS Code Extension | Editor experience with sidebar, canvas, integrated Agent Workbench, and manager-backed runtime actions | Marketplace |
| n8nac | CLI for sync, validation, AI context, and runtime operations through n8n-manager | npx n8nac |
| Agent Skills | Portable AI skills and embedded n8n knowledge for agents | repo skills directory |
| @n8n-as-code/n8nac | OpenClaw plugin with setup, prompt context, and portable skills | openclaw plugins install @n8n-as-code/n8nac |
| @n8n-as-code/transformer | JSON to TypeScript workflow converter and back | npm i @n8n-as-code/transformer |
| @n8n-as-code/workflow-core | Internal workflow contracts, validation, and authoring primitives | workspace package |
| @n8n-as-code/manager-adapter | Internal bridge from product surfaces to n8n-manager runtime capabilities | workspace package |
How The Pieces Fit
The user-facing surfaces all share the same core behavior:
- VS Code/Cursor extension for the full editor and Agent Workbench experience.
n8nacCLI for terminal and automation workflows.- MCP, Claude Code, and OpenClaw integrations for external agent environments.
n8n-managerfor real n8n environments: instances, API keys, projects, local runtimes, credentials, activation, execution, and inspection.- Embedded n8n knowledge for schema validation, node lookup, docs, templates, and AI guidance.
Star History
π€ Contributing
Contributions welcome!
- Fork the project
- Create a branch (
git checkout -b feature/amazing) - Run tests (
npm test) - Open a Pull Request
π License
MIT License β free to use, modify, and distribute.
Third-party community workflow metadata and downloadable workflow files remain subject to their respective upstream licenses.
Acknowledgements
n8n-as-code exists because n8n exists.
Thanks to the n8n team and community for building and maintaining the workflow automation platform this project builds on.
If you use this project, consider starring the n8n repository.
If n8n-as-code saves you time, give us a β β it helps more than you think.
β Star on GitHub Β· π Documentation Β· π Report a Bug
