A command-line tool for managing n8n Cloud workflows.
uv tool install .Create a credentials file with your n8n API credentials. The file can be placed in:
- Your current working directory as
.env(project-specific) ~/.config/n8n-cli/config(global configuration)
Project-specific (.env in current directory):
N8N_API_KEY=your-api-key
N8N_INSTANCE_URL=https://your-instance.app.n8n.cloud/api/v1Global (~/.config/n8n-cli/config):
N8N_API_KEY=your-api-key
N8N_INSTANCE_URL=https://your-instance.app.n8n.cloud/api/v1Alternatively, set environment variables:
export N8N_API_KEY="your-api-key"
export N8N_BASE_URL="https://your-instance.app.n8n.cloud/api/v1"For local development:
uv sync# Install with dev dependencies
uv sync
# Install pre-commit hooks
uv run pre-commit install
# Clean install tool globally (clears cache for fresh build)
uv run poe install
# Quick reinstall without cache clean (faster)
uv run poe reinstall
# Run tests
uv run poe test
# Run code quality checks
uv run poe check # lint + typecheck + test
uv run poe lint # just linting
uv run poe typecheck # just type checking
uv run poe format # format code
# Run pre-commit hooks manually
uv run pre-commit run --all-filesn8n --helpList all workflows:
n8n workflow list
n8n workflow list -v # verbose output with more detailsView workflow details:
n8n workflow view "My Workflow"Activate/deactivate workflows:
n8n workflow activate "My Workflow"
n8n workflow deactivate "My Workflow"Pull workflows to local files:
n8n workflow pull # Pull all workflows
n8n workflow pull "My Workflow" # Pull specific workflow
n8n workflow pull --project "Sales" # Pull all workflows from a projectPush local workflow to cloud:
n8n workflow push workflow.json
n8n workflow push workflow.json --update # Update existing workflowCreate new workflow:
n8n workflow create new_workflow.jsonCompare local and cloud versions:
n8n workflow diff workflow.jsonMove workflow to different project:
n8n workflow move "My Workflow" --project "Marketing"Open workflow in browser:
n8n workflow open "My Workflow"Delete workflow:
n8n workflow delete "My Workflow"List recent executions:
n8n execution list
n8n execution list --workflow "My Workflow" # Filter by workflow
n8n execution list --limit 50 # Show more resultsView execution details:
n8n execution view <execution-id>Download execution data:
n8n execution download <execution-id>
n8n execution download <execution-id> -o execution.jsonRetry failed execution:
n8n execution retry <execution-id>List all projects:
n8n project listView project details:
n8n project view "Sales"List users:
n8n user listInvite user:
n8n user invite user@example.com --role member
n8n user invite admin@example.com --role adminRemove user:
n8n user remove user@example.comList project members:
n8n member list --project "Sales"Add member to project:
n8n member add user@example.com --project "Sales" --role editorRemove member from project:
n8n member remove user@example.com --project "Sales"Enable tab completion for workflows, projects, and file paths:
Automatic (recommended):
n8n --install-completionFollow the shell-specific instructions. You may need to restart your shell.
Manual setup:
Bash:
eval "$(n8n --show-completion bash)"
# Add to ~/.bashrc for persistenceZsh:
eval "$(n8n --show-completion zsh)"
# Add to ~/.zshrc for persistenceFish:
n8n --show-completion fish > ~/.config/fish/completions/n8n.fish- Workflow names:
n8n workflow view <TAB>shows your workflows - Project names:
n8n project view <TAB>shows your projects - File paths:
n8n workflow diff <TAB>shows .json files
Note: The n8n command must be available in your PATH for completion to work. Either activate the virtual environment (source .venv/bin/activate) or install globally.