nCode
Convert n8n workflows into clean, runnable Python — automatically.
What is nCode?
nCode is an open-source transpiler that converts n8n workflow JSON into clean, production-ready Python code. Upload your workflow and get back a complete project — Python source, requirements.txt, .env.example, and a ready-to-run README.md — all in a single ZIP download.
Upload workflow.json → Python project ZIP
│ │
▼ ▼
Pydantic validate main.py (FastAPI or script)
DAG build requirements.txt
Topo sort .env.example
Code emit README.md
Key Features
| Feature | Detail |
|---|---|
| Dual output modes | FastAPI routes for webhook/chat triggers; standalone if __name__ == "__main__" for manual/schedule triggers |
| Expression engine | Translates n8n `` templates — $json, $env, $now, $('Node').json, $fromAI() — into idiomatic Python |
| 20+ node handlers | HTTP requests, branching, data transforms, LangChain AI, databases, and more |
| Credential safety | All secrets emitted as os.getenv(...) with auto-generated .env.example |
| Code quality gates | Output is auto-formatted with black + isort and syntax-validated with py_compile |
| Dependency inference | requirements.txt is generated from the workflow — no manual package hunting |
Quick Start
git clone https://github.com/opsingh861/nCode.git
cd nCode
pip install -r requirements.txt
uvicorn backend.main:app --reload
# Open http://localhost:8000
Or with Docker:
docker compose up --build
See the full Getting Started guide for detailed setup instructions.
Project Status
Contributions welcome! See the Contributing Guide to get started.