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
Releasing
Vership owns versioning, changelog generation, release commits, and tags. See the release runbook for the verified workflow and recovery policy.
Metadata
Release files for n8nc 0.5.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| n8nc-0.5.4.tar.gz | 206.8 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| n8nc-0.5.4-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details |
| n8nc-0.5.4-py3-none-manylinux_2_28_x86_64.whl | Python 3 | none | Linux glibc 2.28+ x86-64 | Details |
| n8nc-0.5.4-py3-none-manylinux_2_28_aarch64.whl | Python 3 | none | Linux glibc 2.28+ ARM64 | Details |
| n8nc-0.5.4-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details |
| n8nc-0.5.4-py3-none-macosx_10_12_x86_64.whl | Python 3 | none | macOS 10.12+ x86-64 | Details |
Total release size: 18.5 MB
Release files / n8nc-0.5.4.tar.gz
| Download URL | n8nc-0.5.4.tar.gz |
|---|---|
| Size | 206.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5bd704cb3cb56ea165fafcccd599b91f593a86be9da1b8f2918a6864460e0fd0
|
|
BLAKE2b-256 checksum How to use checksums |
f48dabd176bc81b5dc53c30f1a812e0206a1ee8bdb6aeebf0ac1011a3551828c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / n8nc-0.5.4-py3-none-win_amd64.whl
| Download URL | n8nc-0.5.4-py3-none-win_amd64.whl |
|---|---|
| Size | 3.7 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
2c03786e87dfc4adae30dc8c1346ca16716a45f5dd9df9fe17ef428d98d6a0c1
|
|
BLAKE2b-256 checksum How to use checksums |
6aef7f0cb5b9abe5b2b1ef65d7b72c463d5292611437f12c268fe43e45aa8763
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / n8nc-0.5.4-py3-none-manylinux_2_28_x86_64.whl
| Download URL | n8nc-0.5.4-py3-none-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 3.7 MB |
| Tags | Linux glibc 2.28+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
a1404e2ffefe28184431e9a982f40eedbe765c809592dfdd253e003b067163a3
|
|
BLAKE2b-256 checksum How to use checksums |
064f18ca761cf5f8d562cac660978a4d2f5b51f6f4b101ff732b0a1c04693140
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / n8nc-0.5.4-py3-none-manylinux_2_28_aarch64.whl
| Download URL | n8nc-0.5.4-py3-none-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 3.6 MB |
| Tags | Linux glibc 2.28+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
e4728a7584ce7e967a6d098372c48b4077eb853b2cbbbe9810fa8ecd11e9bf74
|
|
BLAKE2b-256 checksum How to use checksums |
a515d5b65309f097298f438e51227898529885a02945928867ad9122c0118f90
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / n8nc-0.5.4-py3-none-macosx_11_0_arm64.whl
| Download URL | n8nc-0.5.4-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 3.6 MB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
47c5b774084815feecb7cff99529af7e80c93084ee0faed478c2136294d561d0
|
|
BLAKE2b-256 checksum How to use checksums |
4baaa81789fd1ef0f66510ae028ff9e195b123c9d21302fd0dca42c5380d518d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / n8nc-0.5.4-py3-none-macosx_10_12_x86_64.whl
| Download URL | n8nc-0.5.4-py3-none-macosx_10_12_x86_64.whl |
|---|---|
| Size | 3.6 MB |
| Tags | Python 3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
fa062b8752bbfa90782115ca3dc2140f227164d8b4c16731eafccdbab245e536
|
|
BLAKE2b-256 checksum How to use checksums |
3c2a73c5ba85ddaabdb6aeaefc86843de6809ca31aae4d49736573f49177431a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|