
Company News
/Security News
Socket Selected for OpenAI's Cybersecurity Grant Program
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.
@integratingfactor/n8n-workflow-cli
Advanced tools
CLI tool for managing n8n workflows across environments with support for tags, validation, and multi-environment deployment
A powerful CLI tool for managing n8n workflows across multiple environments with support for tags, validation, and automated deployment.
📁 Workflows as Code - Store workflows in Git alongside your project code
🏷️ Organized by Categories - Tag and filter workflows by project/team using n8n tags
🔄 Bi-directional Sync - Pull workflows from n8n, edit locally, and deploy back
✅ Workflow validation - Comprehensive JSON schema validation
🔄 Pull/Push workflows - Sync workflows between environments
🛡️ Safe Deployments - New workflows are created inactive; no duplicate workflows
⚡ Parallel deployment - Deploy multiple workflows simultaneously
🔍 Dry-run mode - Test deployments without making changes
Install globally to use across all your workflow projects:
npm install -g @integratingfactor/n8n-workflow-cli
Verify installation:
n8n-workflow-cli -h
pullPull workflows from n8n to local files:
n8n-workflow-cli pull [options]
Options:
--category <category> - Only pull workflows with this category tagExamples:
# Pull all workflows
n8n-workflow-cli pull
# Pull only business workflows
n8n-workflow-cli pull --category business
diffCompare local workflows with remote n8n instance:
n8n-workflow-cli diff [workflow]
Arguments:
workflow (optional) - Specific workflow file, category, or omit to compare allExamples:
# Compare all workflows
n8n-workflow-cli diff
# Compare specific workflow
n8n-workflow-cli diff workflows/business/my-workflow.json
# Compare all workflows in a category
n8n-workflow-cli diff business
Output:
deployDeploy local workflows to n8n:
n8n-workflow-cli deploy [options]
Options:
--dry-run - Show what would be deployed without making changesExamples:
# Deploy all workflows
n8n-workflow-cli deploy
# Preview deployment without making changes
n8n-workflow-cli deploy --dry-run
Behavior:
listList workflows:
n8n-workflow-cli list [options]
Options:
--remote - List workflows from n8n instance (also) along with local filesExamples:
# List local workflows
n8n-workflow-cli list
# List remote workflows
n8n-workflow-cli list --remote
validateValidate local workflow JSON files:
n8n-workflow-cli validate
Checks for:
A typical workflow project looks like this:
my-n8n-workflows/
├── .env # Environment variables (gitignored)
├── .gitignore # Ignore .env and other files
├── n8n.config.json # Tool configuration
├── README.md # Project documentation
└── workflows/ # Workflow JSON files
├── business/
│ ├── customer-onboarding.json
│ └── invoice-processing.json
├── management/
│ └── team-reports.json
└── shared/
└── send-notification.json
Create a new directory for your n8n workflows:
mkdir my-n8n-workflows
cd my-n8n-workflows
git init
Create n8n.config.json in your project root:
{
"workflowsDir": "./workflows",
"categories": ["business", "management", "shared"]
}
Configuration Options:
workflowsDir: Directory where workflow JSON files are stored (relative to config file)categories: List of workflow categories (used as n8n tags for organization)💡 Important: The
n8n.config.jsonfile should be committed to your repository.
The CLI uses two simple environment variables:
N8N_API_URL - Your n8n instance API URL (must end with /api/v1)N8N_API_KEY - Your n8n API key (from Settings → API in n8n)Option 1: Using .env file (recommended for local development)
# Edit .env with your values
N8N_API_URL=https://n8n.dev.company.com/api/v1
N8N_API_KEY=your-dev-api-key
# Add `.env` to your `.gitignore`:
echo ".env" >> .gitignore
Option 2: Using shell exports
export N8N_API_URL="https://n8n.dev.company.com/api/v1"
export N8N_API_KEY="your-dev-api-key"
Categories help organize workflows into folders in your repository:
Define categories in the categories array - customize for your project needs (e.g., ["business", "management", "shared"])
Commit the config - The n8n.config.json file with your categories should be committed so the team shares the same organization
Tag workflows in n8n - Only workflows with tags matching a category name will be pulled
This creates workflow JSON files in your workflowsDir, organized by category.
# Pull all workflows with matching category tags
n8n-workflow-cli pull
# Pull only workflows tagged with "business"
n8n-workflow-cli pull --category business
n8n-workflow-cli validate
Edit workflow files locally, then deploy:
# deploy a specific workflow
n8n-workflow-cli deploy workflows/business/my-workflow.json
# deploy all workflows
n8n-workflow-cli deploy
Important: New workflows are created as inactive for safety. You must:
Verify the workflow in n8n UI
Configure credentials and connections
Test the workflow
Manually activate it when ready
.env in .gitignore (never commit credentials)validate before deploying--dry-run to preview changesMake sure your N8N_API_URL includes the full API path:
# ✅ Correct
N8N_API_URL=https://n8n.example.com/api/v1
# ❌ Wrong
N8N_API_URL=https://n8n.example.com
If a workflow was deleted in n8n but exists locally:
The tool prevents duplicates by checking workflow names before creating. If you see duplicates:
pull to sync local files with n8n stateSee CHANGELOG.md for version history and release notes.
Made with ❤️ for the n8n community
FAQs
CLI tool for managing n8n workflows across environments with support for tags, validation, and multi-environment deployment
The npm package @integratingfactor/n8n-workflow-cli receives a total of 2 weekly downloads. As such, @integratingfactor/n8n-workflow-cli popularity was classified as not popular.
We found that @integratingfactor/n8n-workflow-cli demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.