A powerful, interactive CLI to manage and test n8n workflows directly from your terminal.
- ✅ Interactive UI: Manage workflows using a fast, menu-driven interface.
- 🪝 Webhook Invocation: Test webhooks with a powerful Tree View Editor, auto-detection, and history.
- 💾 Local Versioning: Save timestamped checkpoints of your workflows locally.
- ⭐ Favorites: Pin your most-used workflows for quick access.
- 🔐 Profiles: Manage multiple instances (Prod/Staging/Local) with isolated credentials.
- 📦 Import/Export: Robust handling of files, URLs, and
bundle.zipbackups.
npm i -g cli-n8nnpx cli-n8n-
Run the CLI:
With global install:
cli-n8n
Or with npx:
npx cli-n8n
-
Configure: Go to Settings → Configure credentials to connect your n8n instance.
Invoke webhooks interactively without leaving the terminal.
- Tree Editor: Edit complex JSON payloads in a visual tree structure (nesting supported!).
- Auto-Detect: The CLI inspects your workflow to guess required fields.
- History: It remembers your last payload for every workflow.
- Retry: Rapidly tweak and resend requests from the result screen.
Never lose work again. Save snapshots to your machine.
- Save: Select "Save local version" in the menu.
- List: View all saved versions in
./versions/{WorkflowName}/.
- List: Browse workflows with status icons.
- Filter: Search by name or ID.
- Favorites: Highlight important workflows (displayed with ⭐).
Share workflows instantly via HTTP server with optional public access through Cloudflare tunnel.
Share a workflow on your local network:
cli-n8n share <workflow-id>This starts a local HTTP server (default port: 3333) and provides:
- Local URL: Access from your machine (
http://127.0.0.1:3333/workflow.json) - Network URL: Access from devices on the same network
- Auto-copy: URL automatically copied to clipboard
Options:
--port <number>: Custom port (default: 3333)--public: Bind to0.0.0.0for network access--clean=false: Include credentials (default: cleaned)
Share workflows publicly using Cloudflare tunnel (requires cloudflared):
cli-n8n share <workflow-id> --tunnel cloudflareThis creates a temporary public URL via trycloudflare.com:
- ✅ No Cloudflare account required
- ✅ Instant public HTTPS link
- ✅ Perfect for sharing with teammates
⚠️ Link expires when you stop the server (CTRL+C)
Install cloudflared:
# macOS
brew install cloudflare/cloudflare/cloudflared
# Linux
wget https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb
sudo dpkg -i cloudflared-linux-amd64.debImport workflows from multiple sources:
cli-n8n import ./workflow.jsonImport directly from a shared link (perfect with share command!):
cli-n8n import https://example.trycloudflare.com/123.jsonThe CLI automatically:
- Downloads the JSON with retry logic
- Handles DNS resolution delays
- Validates the workflow structure
Import multiple workflows from a backup bundle:
cli-n8n import ./bundle.zip--name "Custom Name": Override workflow name--upsert: Update existing workflow with same name (auto-backup before overwrite)--clean=false: Keep credentials (default: cleaned)--dry-run: Preview what would be imported without making changes
| Command | Description |
|---|---|
cli-n8n |
Launch interactive mode (Recommended) |
cli-n8n list |
List workflows |
cli-n8n list --search "foo" |
Search workflows |
cli-n8n share <id> |
Share workflow locally |
cli-n8n share <id> --tunnel cloudflare |
Share workflow publicly (Cloudflare) |
cli-n8n import ./file.json |
Import from local file |
cli-n8n import <url> |
Import from URL |
cli-n8n import ./bundle.zip |
Import from bundle |
cli-n8n import <url> --upsert |
Import and update if exists |
cli-n8n export --all --bundle |
Backup all workflows to a zip |
cli-n8n delete <id> |
Delete workflow (auto-backed up) |
Switch between environments easily:
cli-n8n --profile stagingOr manage them in Settings.
Optionally configure via ENV (overrides saved config):
export N8N_URL="http://localhost:5678/api/v1"
export N8N_API_KEY="YOUR_KEY"MIT
