All skills
Skillintermediate

@n8n/cli

> **Beta** — Client CLI for n8n. Manage workflows, executions, credentials, and more from the terminal.

Claude Code Knowledge Pack7/10/2026

Overview

@n8n/cli

Beta — Client CLI for n8n. Manage workflows, executions, credentials, and more from the terminal.

A lightweight, zero-dependency CLI that talks to any n8n instance via its public API. Designed for humans, scripts, and AI coding agents alike.

Installation

# Use directly with npx (zero install)
npx @n8n/cli workflow list

# Or install globally
npm install -g @n8n/cli

Configuration

The CLI needs your n8n instance URL and an API key.

Config file (recommended)

n8n-cli config set-url https://my-n8n.app.n8n.cloud
n8n-cli config set-api-key n8n_api_xxxxx
n8n-cli config show

Configuration is saved to ~/.n8n-cli/config.json with restricted file permissions (0600).

Environment variables

Inline flags

n8n-cli --url=https://my-n8n.app.n8n.cloud --api-key=n8n_api_xxxxx workflow list

Resolution order

  1. Command-line flags (--url, --api-key)
  2. Environment variables (N8N_URL, N8N_API_KEY)
  3. Config file (~/.n8n-cli/config.json)

Commands

TopicCommands
workflowlist, get, create, update, delete, activate, deactivate, tags, transfer
executionlist, get, retry, stop, delete
credentiallist, get, schema, create, delete, transfer
projectlist, get, create, update, delete, members, add-member, remove-member
taglist, create, update, delete
variablelist, create, update, delete
data-tablelist, get, create, delete, rows, add-rows, update-rows, upsert-rows, delete-rows
userlist, get
configset-url, set-api-key, show
source-controlpull
skillinstall
audit(top-level)
login / logout(top-level)

Every command supports --help for detailed usage.

Output formats

All commands support three output formats via --format:

FormatFlagUse case
Table--format=table (default)Human-readable terminal output
JSON--format=jsonPiping to jq, programmatic use
ID-only--format=id-onlyPiping to xargs, scripting
# Human-readable table
n8n-cli workflow list

# JSON for scripts
n8n-cli workflow list --format=json | jq '.[] | select(.active) | .id'

# Pipe IDs into another command
n8n-cli workflow list --format=id-only | xargs -I{} n8n-cli workflow deactivate {}

AI agent integration

The CLI ships with a skill file that teaches AI coding agents how to use it.

# Claude Code (project-level)
n8n-cli skill install

# Claude Code (global)
n8n-cli skill install --global

# Cursor
n8n-cli skill install --target=cursor

# Windsurf
n8n-cli skill install --target=windsurf

Development

# Build
pnpm build

# Watch mode
pnpm dev

# Run tests
pnpm test

# Lint & typecheck
pnpm lint
pnpm typecheck

License

See LICENSE.md for details.