CLI for n8n workflow automation
Project description
n8nc
CLI for n8n workflow automation. Sync workflows with Git, author them locally, and manage remote instances from the terminal.
Quick start
# Install (pick one)
cargo install n8nc # From source
pip install n8nc # Via pip
uvx n8nc --help # Run without installing
# Set up a repo
n8nc init --instance prod --url https://your-instance.app.n8n.cloud
n8nc auth add prod --token <api_key>
# Pull and track workflows
n8nc pull --all --instance prod
n8nc status
Installation
From crates.io
cargo install n8nc
From PyPI
pip install n8nc
# or run without installing:
uvx n8nc ls --instance prod
From GitHub releases
Pre-built binaries for Linux (x64, arm64), macOS (x64, arm64), and Windows (x64) on the releases page.
What it does
n8nc is three things:
- Git sync for n8n workflows you want to track locally
- Local authoring for draft workflows and structured node edits
- Development CLI for listing, pulling, pushing, triggering, and inspecting executions
Every command supports --json for agent and script integration.
Commands
n8nc init Set up a workflow repo
n8nc doctor Check repo, auth, and API health
n8nc auth add|test|list|remove Manage API tokens
n8nc auth session add|test|remove Manage browser-session auth
n8nc ls List remote workflows
n8nc get <id-or-name> Fetch and print a workflow
n8nc pull <id-or-name> Pull a workflow into the repo
n8nc pull --all [--active] Pull all workflows
n8nc push <file> Push a tracked workflow back
n8nc push --all Push all modified tracked workflows
n8nc activate <id-or-name> Activate a workflow
n8nc deactivate <id-or-name> Deactivate a workflow
n8nc runs ls List recent executions
n8nc runs get <id> [--details] Inspect one execution
n8nc runs watch Watch executions live
n8nc workflow new <name> Create a local draft
n8nc workflow create <file> Publish a draft to n8n
n8nc workflow execute <id-or-name> Execute via configured backend
n8nc workflow show <file> Inspect a local workflow
n8nc workflow rm <target> Remove a workflow
n8nc node ls|add|set|rename|rm Edit nodes in local workflows
n8nc conn add|rm Edit connections
n8nc expr set Set expressions on nodes
n8nc credential ls|schema|set Discover and assign credentials
n8nc status [--refresh] Show local sync state
n8nc diff <file> [--refresh] Show local changes
n8nc trigger <url> Call a webhook URL
n8nc fmt [--check] Format workflow files
n8nc validate Validate workflow files
n8nc completions <shell> Generate shell completions
Repo model
n8nc init creates:
.
├── n8n.toml # Instance config
├── workflows/ # Tracked and draft workflow files
└── .n8n/cache/ # Base snapshots for local diff
Tracked workflows are stored as canonical JSON with a metadata sidecar:
workflows/<slug>--<id>.workflow.json
workflows/<slug>--<id>.meta.json
The sidecar binds each file to the instance it came from and records a hash used for safe push (lease check).
Auth
Tokens are resolved in order:
N8NC_TOKEN_<ALIAS>env var- OS keychain entry from
n8nc auth add
Optional browser-session auth (for credential inventory fallback):
N8NC_SESSION_COOKIE_<ALIAS>+N8NC_BROWSER_ID_<ALIAS>env vars- OS keychain entries from
n8nc auth session add
Workflow execution
trigger calls webhook URLs directly. For non-webhook workflows, configure an external backend in n8n.toml:
[instances.prod.execute]
backend = "command"
program = "uvx"
args = ["your-runner", "execute_workflow", "{workflow_id}", "{instance_alias}"]
stdin_json = true
Then run:
n8nc workflow execute "Nightly Digest" --instance prod --input '{"dryRun":true}'
Design
- Same-instance first -- tracked files are bound to the instance they were pulled from
- Agent-safe -- every command supports
--jsonwith structured envelopes - Deterministic -- workflows are canonicalized before storage and hashing
- Safe push -- refuses to overwrite remote changes since the last pull
- Sensitive-data aware -- scans for inline secrets on pull, push, and validate
- Honest execution --
triggeris for webhooks;workflow executedelegates to a configured backend
Spec
Implementation notes and roadmap live in docs/cli-spec.md.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file n8nc-0.4.3.tar.gz.
File metadata
- Download URL: n8nc-0.4.3.tar.gz
- Upload date:
- Size: 147.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
641747114372fb0e64d157b73de4eda80eb0386f05899f9a8f96786c3cbbe10c
|
|
| MD5 |
fdac6c06d2cb0edc06b359406bd3f534
|
|
| BLAKE2b-256 |
db499a824795e8b16322e179cb40f2833226edbcb6e6535ec6270620d4e20b1a
|
File details
Details for the file n8nc-0.4.3-py3-none-win_amd64.whl.
File metadata
- Download URL: n8nc-0.4.3-py3-none-win_amd64.whl
- Upload date:
- Size: 3.5 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
900d64d6b3629efff7a1fc36859828379c3f6d2877138ef5fb199ca07cc36613
|
|
| MD5 |
61415b75c3c66dea87ede1a0e0345f91
|
|
| BLAKE2b-256 |
3d083d92482176383d11dbb32810ef92b1e39b2c4b2e8c20644b29ffa9fb0107
|
File details
Details for the file n8nc-0.4.3-py3-none-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: n8nc-0.4.3-py3-none-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 3.5 MB
- Tags: Python 3, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
957044c79f0a23723b6555b5d55b5f0330303d7d01df47d4261ad9f74add54e3
|
|
| MD5 |
bfcd08af4dba32f3993f1cfda578af61
|
|
| BLAKE2b-256 |
e58bbcb55b799c3ed04dbed2ada79c3fd54827478bec69c359824f12f1057886
|
File details
Details for the file n8nc-0.4.3-py3-none-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: n8nc-0.4.3-py3-none-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 3.3 MB
- Tags: Python 3, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ebb8e93cb6e42afd31585411691da9ae82c3e9c3a953ecaaf448612d6b1e6e21
|
|
| MD5 |
395b232a7c5405192f736268c37a19a7
|
|
| BLAKE2b-256 |
56bf2dbcdcfecc79ef7a37ae0dc19b1b5cbe30b7eaa4dbfbe311a9fa55a5d9ca
|
File details
Details for the file n8nc-0.4.3-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: n8nc-0.4.3-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 3.3 MB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
14b4a37853ff514a0a8466a1a4641bc2434560a14756986f645c93ce6b484187
|
|
| MD5 |
19c86671b62d9b52c5bb069f41484d83
|
|
| BLAKE2b-256 |
1c2eba9cbe533791d3cd8bb9760a8ae643095f14d91421ce3750021f992c7a81
|
File details
Details for the file n8nc-0.4.3-py3-none-macosx_10_12_x86_64.whl.
File metadata
- Download URL: n8nc-0.4.3-py3-none-macosx_10_12_x86_64.whl
- Upload date:
- Size: 3.4 MB
- Tags: Python 3, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2a2f04209d2a89f7da0165b9d408e55db2cba211615c555bd93b517825c3e4b
|
|
| MD5 |
d34d0c16c4ba8851a0edeedcace90004
|
|
| BLAKE2b-256 |
d453f3cbbef83f84b8de2ea51b77e794f6a6a46ccb0851f57971d396836fa6eb
|