A command-line interface for applying changes from your inCode workflows to your n8n instance. The inCode CLI lets you easily sync, update, and manage workflows on your n8n instance, streamlining the deployment process.
- Node.js 18+
- npm or yarn
- Access to an n8n instance with API access
npm install -g @n8n-incode/cli# Create a new directory for your project
mkdir my-n8n-workflows
cd my-n8n-workflows
# Initialize the inCode project
incode initThis creates a new project with the following structure:
my-n8n-workflows/
├── workflows/ # Your workflow definitions
│ └── example/ # Example workflow
├── .incode/ # inCode configuration
├── package.json # Project dependencies
├── tsconfig.json # TypeScript configuration
└── .gitignore # Git ignore rules
incode loginYou'll be prompted to enter:
- Your n8n instance URL (e.g.,
https://n8n.example.com) - Your n8n API access token (found in Settings → n8n API → Create API Key)
Edit the example workflow at workflows/example/workflow.ts:
This command will:
- Fetch all workflows from your n8n instance
- Display workflow information including names, IDs, and status
- Validate your local workflow definitions
| Command | Description |
|---|---|
incode init |
Initialize a new inCode project in the current directory |
incode login |
Authenticate with your n8n instance |
incode pull |
Sync workflows from your n8n instance to local state |
-f, --force: Force initialization even if directory is not empty
- Interactive guide to setup API access to your n8n instance
- Automatically saves credentials to
.incode/config.json
- Syncs workflows from your n8n instance to local state
- Requires authentication (run
incode loginfirst)
-
Clone and Install:
git clone https://github.com/n8n-incode/cli cd incode-cli npm install -
Build the Project:
npm run build # build only npm run build-link # build and link for local development
| Script | Description |
|---|---|
npm run build |
Compile TypeScript and copy scaffold files |
npm run dev |
Watch mode for TypeScript compilation |
npm run build-link |
Build and create global link for testing |
npm run copy-scaffold |
Copy scaffold files to dist directory |
This project is licensed under the MIT License.
- Issues: GitHub Issues
- Documentation: GitHub Wiki
- Discussions: GitHub Discussions