# n8n-as-code

> An open-source agentic toolkit that gives AI coding agents full n8n superpowers — 537 nodes with complete schemas, 7,700+ templates, GitOps-style sync, and TypeScript workflow authoring.

n8n-as-code is an independent, MIT-licensed community project built by Etienne Lescot that turns any repository into a full n8n development workspace for AI agents and human developers alike. It ships a complete n8n ontology — 537 nodes, 100% schema coverage across 10,209 properties and 17,155 option values, 1,243 linked documentation pages, and 7,702 searchable community templates — so coding agents can build and edit workflows from grounded knowledge rather than guesswork. The project is not affiliated with, endorsed by, or sponsored by n8n.

## What It Is

n8n-as-code is an agentic toolkit that sits between your editor (or terminal) and a live n8n instance. It packages the full n8n node catalog as a locally searchable ontology, exposes Git-like pull/push/resolve commands for workflow files, and provides a VS Code extension with canvas preview, conflict resolution, and an integrated Agent Workbench. The core idea is that AI agents should work from real schemas and validated context rather than hallucinating node parameters, while human reviewers should see clean, readable diffs instead of opaque JSON blobs.

## How the Stack Fits Together

The project ships several coordinated packages:

- **VS Code / Cursor Extension** — sidebar workspace, canvas preview, integrated Agent Workbench, and environment management directly in the IDE.
- **`n8nac` CLI** — environment setup, explicit pull/push/resolve sync, schema validation, AI context generation, and multi-environment promotion.
- **Agent Skills** — portable n8n knowledge bundles (node schemas, docs, examples, templates, validation rules) for any coding agent, including Claude Code and OpenClaw.
- **`@n8n-as-code/transformer`** — converts n8n JSON workflows to readable TypeScript `.workflow.ts` files and back.
- **`n8n-manager`** — manages local Docker-backed n8n instances, tunnels, and machine-local secrets separately from repository state.

## GitOps Workflow Model

Sync is intentionally explicit: nothing is pushed or pulled unless the developer asks for it. The typical loop is `n8nac list` → `n8nac pull <id>` → edit locally → `n8nac push <file> --verify`. Conflict resolution uses a three-way comparison that detects real conflicts, avoids false positives, and surfaces keep-local or keep-remote decisions through visible diffs. The `promote` command moves workflow source between environments (e.g., Dev → Prod), rewrites project metadata, remaps credentials, and records stable bindings in `n8nac-promotion.json`. A `--dry-run` flag performs discovery without writing files or pushing.

## AI Skill Architecture

The skills layer is the core differentiator. Rather than relying on a model's training data about n8n, the skill bundles the full node ontology locally and makes it searchable in approximately 5 ms via FlexSearch. Agents can call `n8nac skills search`, `n8nac skills node-info`, and `n8nac skills validate` to get schema-accurate node data before writing or modifying any workflow. The Claude Code integration installs as a plugin from the marketplace; the OpenClaw integration uses `@n8n-as-code/n8nac`; generic agents consume the skills directory directly.

## TypeScript Workflow Authoring

Workflows can be authored or converted into `.workflow.ts` files using decorator syntax (`@workflow`, `@node`, `@links`). This format produces stable, human-readable diffs that both developers and agents can reason about, replacing the opaque JSON that n8n stores natively. The `n8nac convert` and `n8nac convert-batch` commands handle conversion in both directions.

## Update: v2.5.0

The latest release is **v2.5.0**, published July 24, 2026. The repository was created in January 2026 and has seen active development through August 2026, with the GitHub project accumulating 1,546 stars and 182 forks as of the last recorded update. The project is published to the VS Code Marketplace, Open VSX Registry, and npm (`n8nac` CLI and `@n8n-as-code/skills` packages). The Claude Code plugin is listed as Beta / Pending Review.

## Features
- 537 n8n nodes with 100% schema coverage
- 10,209 properties and 17,155 option values indexed
- 7,702 community templates searchable locally in ~5ms via FlexSearch
- 1,243 documentation pages linked to nodes
- GitOps-style explicit pull/push/resolve workflow sync
- TypeScript workflow authoring with decorator syntax
- VS Code / Cursor extension with canvas preview and Agent Workbench
- Three-way conflict resolution with keep-local or keep-remote actions
- Multi-environment promotion with credential remapping
- Schema validation before push
- Claude Code plugin integration
- OpenClaw plugin integration
- n8n-manager for local Docker-backed n8n instances and tunnels
- AI skills layer with node-info, search, and validate commands
- JSON to TypeScript workflow converter and back

## Integrations
n8n, VS Code, Cursor, Claude Code, OpenClaw, Docker, npm, GitHub Actions, FlexSearch

## Platforms
CLI, VSC_EXTENSION, API, DEVELOPER_SDK

## Pricing
Open Source

## Version
v2.5.0

## Links
- Website: https://n8nascode.dev/
- Documentation: https://n8nascode.dev/docs/
- Repository: https://github.com/EtienneLescot/n8n-as-code
- EveryDev.ai: https://www.everydev.ai/tools/n8n-as-code
