You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Give developers a friction-free way to pull, edit, version-control, and push n8n workflows from the terminal, using Git locally and the n8n REST API remotely. (docs.n8n.io, docs.n8n.io)
2. Goals & Success Metrics
Goal
KPI / Target
Zero-config after first run
> 95 % of subsequent invocations skip setup prompt
Round-trip workflow update
pull → edit → push in < 10 s for workflows ≤ 250 kB
Security
API key never written to plain-text files; passes OWASP ASVS 4.0 L1 secrets storage checklist
Reliability
< 0.5 % CLI exits with un-handled error across 1 000 executions (telemetry opt-in)
3. Personas
Automation Developer – comfortable with Git & CLI, wants workflow history and code-review.
Ops Engineer – manages self-hosted n8n, needs reproducible deployments and CI integration.
4. User Stories (high-level)
First-time setup – As a dev, I want the CLI to ask for my n8n URL and API key, store them safely, and never ask again unless I run n8n-git config.
Create blank workflow – I can run n8n-git new "My Flow" to create a remote workflow, clone it locally into a new Git repo, and open the JSON in my editor.
List & select – I can type n8n-git list to see my workflows, arrow-select one, and automatically pull it.
Edit & Push – After editing the JSON (or committing changes), n8n-git push uploads and overwrites the remote workflow version.
CI mode – I can run n8n-git pull --id 123 inside CI to download the latest revision without interactive prompts.
5. Functional Requirements
ID
Requirement
F-1
CLI detects absence of ~/.config/n8n-git/config.toml; launches guided setup.
F-2
Store endpoint in confy config file, API key in OS keychain via keyring.
$ n8n-git # first run
? n8n API endpoint: https://automation.mycorp.com/api/v1
? API Key: ********
✔ Credentials saved to system keychain
✔ Config written to ~/.config/n8n-git/config.toml
? What next? ▸ Create new workflow
▹ Pull existing workflow
8. Folder & Git Layout
~/n8n-workflows/
└── my-flow/
├── workflow.json # canonical source of truth
├── README.md # optional docs
└── .git/ # git2-initialised repo
Each pull makes a commit:
feat: sync from n8n (#<workflow-id>).
Why keyring + confy together?confy persists non-secret preferences (endpoint, defaults), while keyring writes the API key into the OS credential store, keeping plaintext out of dotfiles.