EtienneLescot/n8n-as-code

Give your AI agent n8n superpowers. 537 nodes with full schemas, 7,700+ templates, Git-like sync, and TypeScript workflows.

What it solves

n8n-as-code provides a developer-centric workflow for managing n8n automations. It moves n8n development from a purely visual interface to a code-based environment, allowing for version control (GitOps), environment promotion (Dev to Prod), and the ability to use AI agents to build and edit workflows safely using grounded context.

How it works

The project transforms n8n's JSON-based workflows into readable TypeScript files (.workflow.ts), which are easier for both humans and AI agents to modify. It provides a CLI (n8nac) and a VS Code/Cursor extension to sync these files with n8n environments, validate them, and manage local n8n instances via n8n-manager. To enable AI agents, it provides a "skills" layer containing node schemas, documentation, and validation rules that agents can use to generate accurate workflows.

Who it’s for

Developers and automation engineers who use n8n and want to apply software engineering best practices like GitOps, environment management, and AI-assisted development within their preferred code editor.

Highlights

  • GitOps Sync: Explicitly pull and push workflows to version control, review diffs, and resolve conflicts.
  • TypeScript Authoring: Convert workflows into TypeScript for better readability and editability.
  • Agent-Ready Context: Provides grounded knowledge (schemas, examples) so AI agents can safely generate and edit workflows.
  • Environment Promotion: Move workflows from one environment (e.g., Dev) to Prod with automatic remapping of credentials and references.
  • Integrated Tooling: Includes a VS Code extension, a CLI, and specialized skills for agents like Claude Code.

Related

  • Project
  • Project
  • Project
  • Project
  • Project