
N8n Cli
This wraps n8n's REST API in a composable CLI that auto-switches to JSON when piped, making it easy to script workflow management or chain commands together. You get full CRUD on workflows, executions, credentials, and data tables, plus filtering, jq-style extraction, and the ability to pipe workflow JSON through standard tools for modifications. The credential schema command is handy for discovering required fields before you create one. It's built for both interactive use and shell scripting, with global flags for format control and debugging. If you're managing n8n instances programmatically or need to automate workflow deployments, this beats clicking through the UI or writing raw curl commands.
- skills.sh installs
- 209
- GitHub stars
- 210K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add n8n-io/n8n --skill n8n-cli --agent claude-codeInstalls into .claude/skills of the current project.
Files
n8n CLI
The n8n-cli command-line tool manages an n8n instance via its REST API.
It auto-detects piped output and switches to JSON, making it composable for scripts and LLM tool use.
Setup
# Interactive login (saves to ~/.n8n-cli/config.json)
n8n-cli login
# Or configure directly
n8n-cli config set-url https://my-instance.n8n.cloud
n8n-cli config set-api-key n8n_api_...
# Or use environment variables (no config file needed)
export N8N_URL=https://my-instance.n8n.cloud
export N8N_API_KEY=n8n_api_...
Global Flags
Every command supports these flags:
| Flag | Short | Description |
|---|---|---|
--url | -u | Instance URL (overrides config/env) |
--apiKey | -k | API key (overrides config/env) |
--format | -f | Output format: table, json, id-only |
--json | Shorthand for --format=json | |
--jq | jq-style filter (implies --json), e.g. '.[0].id', '.[].name' | |
--quiet | -q | Suppress output |
--no-header | Hide table headers (for awk/cut parsing) | |
--debug | Print HTTP details to stderr |
Auto-JSON: When stdout is piped (not a TTY), output defaults to JSON automatically.
Sponsors
Details
- Repository
- github.com/n8n-io/n8n
- Categories
- Automation & Workflows, CLI & Terminal
- First seen
- Jun 3, 2026