| name | n8n-cli |
| description | Use this skill for service operations only. DO NOT use this skill for CLI implementation lifecycle work such as creating, testing, updating, troubleshooting, validating, removing, or documenting the CLI tool itself; delegate those tasks to cli-tool-expert. MANDATORY: Use this skill for ALL n8n CLI operations. DO NOT run `n8n` CLI commands or guess flag syntax without loading this skill first. Covers workflows, nodes, executions, credentials, data tables, server/logs, auth, and profiles. Triggers: n8n, n8n cli, n8n workflows, n8n executions, n8n credentials, n8n nodes, n8n data tables, list n8n workflows, n8n server logs, my n8n, trigger n8n workflow, n8n execution history, install n8n node |
Execute n8n operations using the `n8n` CLI. All n8n interactions should use this CLI.
<quick_start>
The n8n CLI follows this pattern:
n8n <command-group> <action> [arguments] [options]
| Task | Command |
|---|
| List workflows | n8n workflows list --table |
| Get workflow detail | n8n workflows get <workflow_id> |
| Trigger a workflow | n8n workflows execute <workflow_id> |
| Query recent executions | n8n executions list --filter created_at:gte:2026-04-11 --table |
| Get execution detail | n8n executions get <execution_id> |
| List credentials | n8n credentials list --table |
| List data-table rows | n8n data-tables rows <table_id> --table |
| Check server version | n8n server version |
| Check auth status | n8n auth status |
| </quick_start> | |
<essential_principles>
MANDATORY: Consult the adjacent usage.json at <cli-tools-root>/_repo/skills/<tool>-cli/usage.json before executing ANY n8n command.
This file contains complete command syntax, all arguments, all options, and usage instructions for every command. Never guess at command syntax.
`n8n` also exists as an upstream/vendor Node CLI on this host, and that binary
fails repo-owned commands with `Error: Command "workflows" not found`. Before
running n8n service commands, especially inside `&&` batches after unrelated
scripts, verify resolution with `command -v n8n` or bypass PATH with the
canonical repo-owned launcher: `$HOME/.local/bin/n8n`. If `command -v n8n` is not
`$HOME/.local/bin/n8n`, do not run bare `n8n`; run `$HOME/.local/bin/n8n ...` or
prepend `$HOME/.local/bin` and clear the shell command cache (`hash -r` in Bash)
first.
Use `usage.json` as the primary syntax source. Do not run unbounded n8n
group-level help probes or unbounded local Node source-inspection probes against
global n8n `node_modules` paths. `n8n data-tables --help` is known to hang for
over 40 seconds and can exit `130` after Ctrl+C with no output; a local Node
heredoc reading
`/opt/homebrew/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/DataTable/DataTable.node.js`
has shown the same failure shape. If live help or local source inspection is
required, select the leaf command or exact source path from `usage.json` or the
repo-owned n8n CLI source, capture stdout/stderr under the task workspace, and
run it with an explicit deadline. Treat a timeout as blocker evidence, not as
successful command discovery.
`n8n workflows list` has no `--json` option. The command's default stdout is
JSON; `--table` switches to table output. For machine parsing, run
`n8n workflows list --properties "id,name,active"` without `--json`, save stdout
to a file, verify the command status and non-empty file, then parse. For human
display, use `--table`. The supported options are the ones in `usage.json`:
`--table`, `--limit`, `--filter`, `--properties`, `--active`, and `--profile`.
- **auth** -- login, logout, status, refresh, test credentials
- **auth** -- Authentication commands and nested `auth profiles` management
- **cache** -- manage the local response cache
- **workflows** -- list, get, create, update, delete, activate, deactivate, export, execute, assign-error-handler, node
- **nodes** -- test, create, deploy, remove, install, list, get community node packages
- **credentials** -- list, get, create, delete, rename, schema for server credentials
- **data-tables** -- CRUD on n8n Data Tables (list, get, create, delete, columns, rows, insert, update-rows, delete-rows)
- **executions** -- query execution history (list, get, events via SSH)
- **server** -- upgrade, version, restart, logs, config
All list commands support `--filter/-f` using `field:op:value` syntax.
Operators: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`, `like`, `ilike`, `null`, `notnull`, `contains`, `startswith`, `endswith`.
Examples: `--filter name:contains:sync`, `--filter active:eq:true`, `--filter created_at:gte:2026-04-11`.
`n8n workflows create` emits the created workflow JSON on stdout. When a later
step needs the workflow ID, save stdout to a file, verify the create command
exited `0`, then parse `.id` from that JSON with `jq -r '.id'` or another JSON
parser. Do not grep for labels such as `id:`; JSON uses `"id":`, and an
unguarded no-match can make a successful create look failed.
<reference_index>
usage.json -- Complete command tree with arguments, options, defaults, and usage instructions for every command.
</reference_index>
<success_criteria>
- Command executes without error
- Output is displayed in requested format
- Correct command and flags used (verified against usage.json)
</success_criteria>