The missing GitOps link for n8n.
Turn workflows and credentials into version-controlled, CI-deployable code with zero runtime dependencies.
Features • Installation • Quick Start • Configuration • Contributing
nac is a CLI tool designed to treat n8n workflows and credentials as first-class citizens in your development lifecycle. It enables a true GitOps workflow: develop locally, version in Git, and deploy to production via CI/CD.
- Zero Runtime Dependencies: Written in Go. Connects directly to Postgres. No need for the n8n CLI or Docker on your host for core operations.
- Credentials as Code: Safely export credentials. Secrets are replaced with
ENV:PLACEHOLDERstrings and automatically synchronized with your.env.localor remote environment files. - Smart Diffing: Automatically strips noisy, instance-specific metadata (timestamps, version counters, etc.) so your Git history stays clean.
- Automatic Ownership: Handles n8n 2.x's project ownership model. Imported workflows and credentials are automatically linked to your default project.
- Cross-Environment Portability: Automatically remaps internal
executeWorkflownode references between environments where database IDs differ. - Mirror Mode: Keep your remote environment perfectly in sync with your repository by automatically removing items that no longer exist in Git.
- Built-in Troubleshooting: Includes a wrapper around the n8n REST API to list executions and debug nodes directly from your terminal.
| Component | Technology | Version |
|---|---|---|
| Language | Go | 1.24+ |
| CLI Framework | Cobra | v1.10 |
| Database Driver | pgx | v5.8 |
| Env Management | godotenv | v1.5 |
| Testing | testcontainers-go | v0.40 |
brew install crymfox/tap/nac# Using an AUR helper (like yay or paru)
yay -S nac-binLinux (amd64)
curl -L https://github.com/crymfox/nac/releases/latest/download/nac_Linux_x86_64.tar.gz | tar xfz
chmod +x nac
sudo mv nac /usr/local/bin/macOS (Apple Silicon)
curl -L https://github.com/crymfox/nac/releases/latest/download/nac_Darwin_arm64.tar.gz | tar xfz
chmod +x nac
sudo mv nac /usr/local/bin/Windows (x64)
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12; iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/crymfox/nac/main/install.ps1'))git clone https://github.com/crymfox/nac.git
cd nac
make build
./nac versionInitialize a new project:
mkdir my-automation && cd my-automation
nac initThis scaffolds:
nac.yaml: Main configuration and credential type mappings.docker-compose.yaml: Ready-to-use local development stack..env.local: Local secrets (includes a generatedN8N_ENCRYPTION_KEY).n8n_workflows/&n8n_credentials/: Where your code lives.
Start your local instance:
nac upOpen http://localhost:5678, build your workflows, then export them:
nac export workflows
nac export credentialsCommit and push to trigger your CI/CD pipeline!
The nac.yaml file allows you to define multiple environments and custom credential mappings.
environments:
production:
db:
host_env: DB_HOST
user_env: DB_USER
password_env: DB_PASS
ssl: true
encryption_key_env: N8N_ENCRYPTION_KEYDefine how nac should handle your specific credentials:
credential_types:
myCustomApi:
fields:
- name: apiKey
secret: true
env_suffix: _API_KEYWe welcome contributions! Please see our Contributing Guide for details on how to get started.
This project uses GoReleaser for automated releases. To enable the Homebrew tap distribution, you must:
- Create a GitHub Personal Access Token (PAT) with
reposcope. - Add it as a secret named
TAP_GITHUB_TOKENin your repository settings.
Distributed under the MIT License. See LICENSE for more information.
Built with ❤️ by Crymfox Labs
