#

n8n-as-code
### The agentic toolkit for n8n.
**VS Code / Cursor Agent · n8n Environments · n8n-manager · GitOps · AI Skills · TypeScript Workflows**
[](https://github.com/EtienneLescot/n8n-as-code/actions/workflows/ci.yml)
[](https://n8nascode.dev/)
[](https://marketplace.visualstudio.com/items?itemName=etienne-lescot.n8n-as-code)
[](https://open-vsx.org/extension/etienne-lescot/n8n-as-code)
[](https://www.npmjs.com/package/n8nac)
[](https://www.npmjs.com/package/@n8n-as-code/skills)
[](https://n8nascode.dev/docs/usage/claude-plugin/)
[](https://opensource.org/licenses/MIT)
**Build, edit, deploy, and debug n8n workflows from your editor with an agent that has live n8n context.**
[**Documentation**](https://n8nascode.dev/) · [**Getting Started**](https://n8nascode.dev/docs/getting-started/) · [**VS Code Guide**](https://n8nascode.dev/docs/usage/vscode-extension/) · [**CLI Guide**](https://n8nascode.dev/docs/usage/cli/)
---
> **n8n version compatibility** — The node schema bundled with n8n-as-code is built against the latest stable release of n8n. Keep your n8n instance up to date for best generation and validation results.
> **Independent project** — n8n-as-code is an independent community project and is not affiliated with, endorsed by, or sponsored by n8n.
---
## What n8n-as-code Gives You
n8n-as-code turns a repository into a full n8n development workspace:
| Capability | What it means |
|---|---|
| **Editor-native workflow work** | Browse, open, edit, validate, and sync n8n workflows from VS Code, Cursor, or the terminal. |
| **Agent-ready context** | Generate grounded instructions, schemas, examples, and node knowledge so AI agents can work on real n8n workflows safely. |
| **GitOps-style sync** | Pull and push workflows explicitly, review diffs, resolve conflicts, and keep workflow source in version control. |
| **TypeScript workflow authoring** | Convert workflows into readable `.workflow.ts` files that are easier for people and agents to edit. |
| **Live n8n operations** | Verify workflows, inspect credentials, run tests, activate workflows, and inspect executions against a selected n8n environment. |
The repository stores workflow files, generated agent context, and workspace-safe configuration. Secrets and machine-local runtime state stay local.
## Quick Start
### VS Code / Cursor
1. Install the extension from the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=etienne-lescot.n8n-as-code) or [Open VSX](https://open-vsx.org/extension/etienne-lescot/n8n-as-code).
2. Open a folder or `.code-workspace`.
3. Click on the extension icon then on the gear icon to configure your workspace.
4. Create or select an `n8n environment`.
5. Pull or create workflows with the integrated Agent Workbench or the agent of your choice.
The configuration UI uses the same model as the CLI: workspace environments are repository context, local managed instances are machine resources.
[VS Code / Cursor guide](https://n8nascode.dev/docs/usage/vscode-extension/)
### Claude Code
```text
/plugin marketplace add https://github.com/EtienneLescot/n8n-as-code
/plugin install n8n-as-code@n8nac-marketplace
```
Then ask Claude for the workflow you want. The `n8n-architect` skill handles workspace setup, n8n context, validation, and sync steps as needed.
[Claude setup docs](https://n8nascode.dev/docs/usage/claude-plugin/)
### Generic Agent Skills
Install the skill from the repository skills directory:
```text
https://github.com/EtienneLescot/n8n-as-code/tree/main/skills
```
Then ask your agent for the workflow you want. The skill gives it the n8n schemas, examples, validation rules, and workspace commands it needs to handle the rest.
If your agent asks for an explicit skill path, use `skills/n8n-architect`.
[Skills reference](https://n8nascode.dev/docs/usage/skills/)
### CLI
Create a workspace environment for an existing n8n URL:
```bash
npx --yes n8nac env add Dev --base-url https://n8n.example.com --workflows-path workflows/dev
printf '%s' "$N8N_API_KEY" | npx --yes n8nac env auth set Dev --api-key-stdin
npx --yes n8nac env use Dev
npx --yes n8nac update-ai
```
Or attach a local managed instance:
```bash
n8n-manager instance list
npx --yes n8nac env add Local --managed-instance