Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 20 additions & 2 deletions lib/llm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ The \`--body\` flag replaces the whole page content; pass \`--append\` to add to
n8nctl: {
filename: 'cli-n8nctl.md',
name: 'n8nctl',
purpose: 'n8n workflow management, execution, and variables',
purpose: 'n8n workflow management, execution, variables, and source control',
content: `## n8n Workflow CLI (n8nctl)

CLI for managing n8n workflows - pull/push for version control, execute workflows, and manage multiple instances.
Expand Down Expand Up @@ -672,10 +672,28 @@ n8nctl execution retry <id> # Retry failed execution
n8nctl execution delete <id> # Delete execution
\`\`\`

### Source control (instance Git connection)

\`\`\`bash
n8nctl source-control status # Pending changes a push would commit (IDs for push)
n8nctl source-control status --direction pull # Changes a pull would import
n8nctl source-control push -m "msg" --workflow <id> # Commit + push named workflows (repeatable)
n8nctl source-control push -m "msg" --item credential:<id> # Other types: workflow, tags, variables, file, folders, project, datatable
Comment thread
Hinne1 marked this conversation as resolved.
n8nctl source-control push -m "msg" --workflow <id> --force # Push despite conflicts
n8nctl source-control pull # Import the connected branch (overwrites drafts)
n8nctl source-control pull --auto-publish published # none (default) | all | published
n8nctl source-control pull --force # Discard conflicting local changes
\`\`\`

- Push commits to the branch other connected instances pull from; name only the items you changed.
- A pull on a production instance is a production deploy: show the command and wait for confirmation.
- A 409 lists the conflicting items; check them before rerunning with \`--force\`.
- 403 means the API key lacks \`sourceControl:read\` / \`sourceControl:push\` / \`sourceControl:pull\`, or source control is not connected.

### Tips

- Use \`--json\` flag on any command for JSON output (useful for scripting)
- Aliases: \`workflow\` → \`wf\`, \`execution\` → \`exec\`, \`variable\` → \`var\`
- Aliases: \`workflow\` → \`wf\`, \`execution\` → \`exec\`, \`variable\` → \`var\`, \`source-control\` → \`sc\`
- Recursive pull creates \`manifest.json\` tracking workflow dependencies
- Push with manifest handles sub-workflow ID remapping automatically
`,
Expand Down
Loading