Turning n8n’s drag-and-drop into typed GitOps
It turns n8n’s opaque JSON workflows into reviewable TypeScript so you can edit, sync, and agent-drive them like real code.

What it does n8n-as-code is a VS Code extension and CLI that treats an n8n instance as a remote environment and your repository as the source of truth. It pulls workflows down as readable TypeScript files, lets you edit and validate them in an editor, and pushes them back explicitly. It also bundles portable AI skills—context about node schemas, examples, and validation rules—that agents like Claude or Cursor can use to generate or refactor workflows without guessing.
The interesting bit
The promote mechanism handles the tedious metadata remapping when moving workflows from one environment to another, rewriting project IDs, remapping credentials, and tracking stable bindings in a promotion file. It’s the kind of boring ops problem that usually breaks manual exports, and the tool treats it as a first-class concern.
Key highlights
- Converts n8n’s JSON workflows into TypeScript classes with decorators, turning opaque blobs into reviewable source code.
- Explicit GitOps-style sync: pull, push, verify, and resolve conflicts manually—nothing is implicit.
- Bundles portable AI skills that feed agents live node schemas and examples so they edit workflows safely.
- Environment-aware workspace model separates repository config from machine-local secrets and managed Docker instances.
- Includes a migration path from V1 to V2 workspace environments for existing users.
Caveats
- The project is independent and unofficial; if n8n changes its internal schema, the bundled definitions can drift.
- A V1-to-V2 migration is required for older workspaces, and legacy commands still linger for compatibility.
- Sync is explicit by design, so if you expect automatic bi-directional mirroring, you will be disappointed.
Verdict Worth a look if you run n8n in a team and are tired of copy-pasting JSON between instances. Skip it if you are a solo user happy clicking inside n8n’s own web UI.
Frequently asked
- What is EtienneLescot/n8n-as-code?
- It turns n8n’s opaque JSON workflows into reviewable TypeScript so you can edit, sync, and agent-drive them like real code.
- Is n8n-as-code open source?
- Yes — EtienneLescot/n8n-as-code is open source, released under the MIT license.
- What language is n8n-as-code written in?
- EtienneLescot/n8n-as-code is primarily written in TypeScript.
- How popular is n8n-as-code?
- EtienneLescot/n8n-as-code has 1.6k stars on GitHub.
- Where can I find n8n-as-code?
- EtienneLescot/n8n-as-code is on GitHub at https://github.com/EtienneLescot/n8n-as-code.