Skip to content

404-rv/n8n-cli

Repository files navigation

n8n CLI

A fast, native command-line interface for n8n workflow automation. Built in Rust for zero-latency operations.

Installation

Quick Install (Recommended)

Windows (PowerShell - Run as Administrator recommended)

irm https://raw.githubusercontent.com/404-rv/n8n-cli/main/install.ps1 | iex

macOS / Linux

curl -fsSL https://raw.githubusercontent.com/404-rv/n8n-cli/main/install.sh | bash

After installation, restart your terminal and run n8n --version to verify.

Manual Download

Download the latest release for your platform from Releases:

Platform Download
Windows (x64) n8n-windows-x64.exe
macOS (Intel) n8n-macos-x64
macOS (Apple Silicon) n8n-macos-arm64
Linux (x64) n8n-linux-x64

Manual install steps:

  1. Download the binary for your platform
  2. Rename to n8n (or n8n.exe on Windows)
  3. Move to a directory in your PATH:
    • Windows: C:\Users\YourName\.local\bin\
    • macOS/Linux: ~/.local/bin/
  4. Make executable (macOS/Linux): chmod +x ~/.local/bin/n8n

Build from Source

Requires Rust 1.75+

git clone https://github.com/404-rv/n8n-cli.git
cd n8n-cli
cargo build --release
# Binary will be at target/release/n8n (or n8n.exe on Windows)

Configuration

Set your n8n credentials via environment variables:

export N8N_API_URL="https://your-instance.app.n8n.cloud"
export N8N_API_KEY="your-api-key"

Or create a config file at ~/.config/agency-cli/config.toml:

[n8n]
api_url = "https://your-instance.app.n8n.cloud"
api_key = "your-api-key"

Commands

n8n list

List all workflows in your n8n instance.

n8n list                        # List all workflows
n8n list --active=true          # Only active workflows
n8n list --tags=production      # Filter by tag
n8n list --limit=10 --json      # JSON output, limit 10

n8n run <workflow-id>

Execute a workflow.

n8n run abc123                              # Run workflow
n8n run abc123 --data='{"key":"value"}'     # With input data
n8n run abc123 --wait                       # Wait for completion

n8n logs

View execution history.

n8n logs                              # Recent executions
n8n logs --workflow=abc123            # Filter by workflow
n8n logs --status=error --limit=5     # Failed executions

n8n get <workflow-id>

Get details of a specific workflow.

n8n get abc123
n8n get abc123 --json

n8n validate <workflow-id>

Check if a workflow exists and is properly configured.

n8n validate abc123

n8n health

Test connection to your n8n instance.

n8n health

Why This CLI?

  • Zero overhead: Native binary, instant startup
  • Scriptable: JSON output for automation pipelines
  • Secure: Credentials stored locally, TLS-only connections
  • Cross-platform: Windows, macOS, Linux support

License

MIT

About

Fast, native CLI for n8n workflow automation - built in Rust

Topics

Resources

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •