Skip to main content

Requesting a code review with CLI do GitHub Copilot

Use CLI do Copilot to review your code changes directly from the terminal.

Quem pode usar esse recurso?

CLI do GitHub Copilot está disponível em todos os planos de Copilot. Se você receber o Copilot de uma organização, a política CLI do Copilot deverá ser habilitada nas configurações da organização.

Neste artigo

About agentic code review

You can use the /review slash command to have Copilot analyze code changes without leaving the CLI. This lets you get quick feedback on your changes prior to committing.

  1. Type /review and optionally specify a prompt, path, or file pattern to narrow the review scope, then press Enter.
  2. If Copilot proposes running a command (for example, to inspect a diff or verify a file), review the command, then use the arrow keys to choose an option and press Enter.
    • Select Yes to run the command.
    • Select No to skip the command and tell Copilot what to do differently.
  3. Read the feedback that Copilot provides about your changes and apply any suggested improvements in your code editor.

Further reading