feat: Add n8n-node CLI with commands to scaffold and develop nodes (#18090)

This commit is contained in:
Elias Meire
2025-08-15 14:55:39 +02:00
committed by GitHub
parent a1280b6bf4
commit c26104b3ba
93 changed files with 4279 additions and 380 deletions

View File

@@ -1,11 +1,16 @@
{
"private": true,
"type": "module",
"name": "@n8n/node-cli",
"version": "0.1.0",
"description": "Official CLI for developing community nodes for n8n",
"bin": {
"n8n-node": "./bin/n8n-node.js"
"n8n-node": "./bin/n8n-node.mjs"
},
"exports": {
"./eslint": {
"types": "./dist/configs/eslint.d.js",
"default": "./dist/configs/eslint.js"
}
},
"files": [
"bin",
@@ -14,16 +19,17 @@
"scripts": {
"clean": "rimraf dist .turbo",
"typecheck": "tsc --noEmit",
"dev": "tsc -w",
"copy-templates": "./scripts/copy-templates.mjs",
"dev": "tsc -p tsconfig.build.json -w --onCompilationComplete \"pnpm copy-templates\"",
"format": "biome format --write src",
"format:check": "biome ci src",
"lint": "eslint src --quiet",
"lintfix": "eslint src --fix",
"build": "tsc",
"build": "tsc -p tsconfig.build.json && pnpm copy-templates",
"publish:dry": "pnpm run build && pnpm pub --dry-run",
"test": "vitest run",
"test:dev": "vitest --silent=false",
"start": "./bin/n8n-node.js"
"start": "./bin/n8n-node.mjs"
},
"repository": {
"type": "git",
@@ -31,16 +37,34 @@
},
"oclif": {
"bin": "n8n-node",
"commands": "./dist/commands",
"commands": {
"strategy": "explicit",
"target": "./dist/index.js",
"identifier": "commands"
},
"topicSeparator": " "
},
"dependencies": {
"@clack/prompts": "^0.11.0",
"@oclif/core": "^4.5.2",
"prompts": "^2.4.2"
"change-case": "^5.4.4",
"handlebars": "4.7.8",
"picocolors": "catalog:",
"prompts": "^2.4.2",
"ts-morph": "^26.0.0"
},
"devDependencies": {
"@eslint/js": "^9.29.0",
"@n8n/typescript-config": "workspace:*",
"@n8n/vitest-config": "workspace:*",
"@oclif/test": "^4.1.13"
"@oclif/test": "^4.1.13",
"eslint-import-resolver-typescript": "^4.4.3",
"eslint-plugin-import-x": "^4.15.2",
"eslint-plugin-n8n-nodes-base": "1.16.3",
"n8n-workflow": "workspace:*",
"rimraf": "catalog:",
"typescript": "catalog:",
"typescript-eslint": "^8.35.0",
"vitest-mock-extended": "catalog:"
}
}