Skip to content

Copilot

GitHub Copilot CLI brings GitHub Copilot to your terminal.

Installation

Requires the GitHub Copilot CLI extension.

Base Invocation

text
copilot -p "<prompt>"

Common Flags

FlagTypeDescription
--modelstringModel variant
--barebooleanMinimal output mode

Example

yaml
steps:
  - name: explain-code
    action: harness.run
    with:
      provider: copilot
      prompt: "Explain what this function does and suggest improvements"
      model: gpt-4o

Generated invocation:

text
copilot -p "Explain what this function does and suggest improvements" --model gpt-4o

YOLO Mode

GitHub Copilot does not have interactive approval prompts in CLI mode. When using -p (prompt mode), it runs non-interactively by default, making it suitable for automated workflows without additional flags.

However, if you want to ensure fully autonomous execution, use the --auto flag:

yaml
steps:
  - name: auto-review
    action: harness.run
    with:
      provider: copilot
      prompt: "Review this PR for security issues"
      auto: true

Generated invocation:

text
copilot -p "Review this PR for security issues" --auto

See Also

Released under the MIT License.