
Research
SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.
n8n-nodes-github-copilot
Advanced tools
n8n community node for GitHub Copilot with CLI integration, Chat API access, and AI Chat Model for workflows with full tools and function calling support - access GPT-5, Claude, Gemini and more using your Copilot subscription
Este é um community node para n8n que integra o GitHub Copilot através do novo GitHub Copilot CLI em modo programático e da API oficial do GitHub Copilot, permitindo acesso direto aos modelos avançados de IA como GPT-5, Claude Sonnet 4.5, Gemini 2.5 Pro e muito mais usando seus créditos existentes do Copilot.
copilot -p "prompt"Você precisa ter uma assinatura ativa do GitHub Copilot:
O node agora usa o novo GitHub Copilot CLI standalone (não mais a extensão gh copilot que foi depreciada):
# Via install script
curl -fsSL https://gh.io/copilot-install | bash
# Ou via npm
npm install -g @github/copilot
# Autenticar (primeira vez)
copilot
# Use o comando /login quando solicitado
# Usando Homebrew
brew install copilot-cli
# Ou via npm
npm install -g @github/copilot
# Autenticar
copilot
# Usando npm
npm install -g @github/copilot
# Ou via WinGet
winget install GitHub.Copilot
# Autenticar
copilot
⚠️ IMPORTANTE: O antigo gh copilot (extensão do GitHub CLI) foi depreciado. Este node agora usa o novo copilot CLI standalone.
npm run builddist para o diretório de nodes do n8nGitHub Copilot CLI tem requisitos específicos de autenticação:
gh auth login (recomendado para servidores)gh auth token após fazer login# No servidor onde roda o n8n
gh auth login
gh extension install github/gh-copilot
# Testar se funciona
gh copilot explain "ls -la"
# Primeiro faça login local
gh auth login
# Depois obtenha o token
gh auth token
# Resultado: gho_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# Use este token no campo "GitHub Token (Optional)" do node
gh auth login)gh auth tokenPara usar o GitHub Copilot Chat API (com modelos GPT-5, Claude, etc.):
https://your-n8n-instance.com/rest/oauth2-credential/callbackcopilot read:org repo userGera sugestões de código em linguagens específicas.
Parâmetros:
Exemplo:
Prompt: "create a function to validate email addresses"
Language: "JavaScript"
Explica funcionalidades de código existente.
Parâmetros:
Exemplo:
Prompt: "function validateEmail(email) { return /\S+@\S+\.\S+/.test(email); }"
Sugere comandos shell para tarefas específicas.
Parâmetros:
Exemplo:
Prompt: "commit all changes with message"
Command Type: "Git Command"
O node retorna um objeto JSON com:
{
"operation": "suggest",
"prompt": "create a REST API endpoint",
"language": "javascript",
"suggestion": "// Código sugerido pelo Copilot",
"rawOutput": "Saída completa do CLI",
"timestamp": "2024-01-15T10:30:00.000Z"
}
Webhook (POST) → GitHub Copilot (Suggest) → HTTP Response
Payload do Webhook:
{
"prompt": "create a login function",
"language": "python",
"context": "using Flask framework"
}
Telegram Bot → GitHub Copilot (Shell) → Telegram Bot (Reply)
FROM n8nio/n8n:latest
USER root
# Instalar GitHub CLI
RUN apt-get update && apt-get install -y curl gnupg
RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
RUN echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null
RUN apt-get update && apt-get install -y gh
# Instalar o community node
RUN npm install -g n8n-nodes-github-copilot
USER node
# Definir variáveis de ambiente
ENV GITHUB_TOKEN=""
ENV N8N_COMMUNITY_PACKAGES="n8n-nodes-github-copilot"
version: '3.8'
services:
n8n:
build: .
ports:
- "5678:5678"
environment:
- GITHUB_TOKEN=${GITHUB_TOKEN}
- N8N_COMMUNITY_PACKAGES=n8n-nodes-github-copilot
volumes:
- n8n_data:/home/node/.n8n
volumes:
n8n_data:
# Clonar repositório
git clone https://github.com/sufficit/n8n-nodes-github-copilot.git
cd n8n-nodes-github-copilot
# Instalar dependências
npm install
# Construir
npm run build
# Lint
npm run lint
# Formatar código
npm run format
├── nodes/
│ ├── GitHubCopilot/
│ │ ├── GitHubCopilot.node.ts
│ │ └── githubcopilot.svg
│ ├── GitHubCopilotChatAPI/
│ │ └── GitHubCopilotChatAPI.node.ts
│ └── GitHubCopilotChatModel/
│ └── GitHubCopilotChatModel.node.ts
├── shared/
│ └── models/
│ └── GitHubCopilotModels.ts
├── package.json
├── tsconfig.json
├── gulpfile.js
└── README.md
MIT License - veja LICENSE para detalhes.
git checkout -b feature/AmazingFeature)git commit -m 'Add some AmazingFeature')git push origin feature/AmazingFeature)Feito com ❤️ pela equipe Sufficit
FAQs
n8n community node for GitHub Copilot with CLI integration, Chat API access, and AI Chat Model for workflows with full tools and function calling support - access GPT-5, Claude, Gemini and more using your Copilot subscription
We found that n8n-nodes-github-copilot demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.

Company News
Socket is proud to join the OpenJS Foundation as a Silver Member, deepening our commitment to the long-term health and security of the JavaScript ecosystem.

Security News
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.