GitHub presents a demonstration by @shanselman on leveraging the –yolo mode of GitHub Copilot CLI, which enables autonomous command execution—ideal for containerized or automated developer workflows.

Demo: Using GitHub Copilot CLI and YOLO Mode

In this demonstration, @shanselman walks through the functionality of the --yolo mode in the GitHub Copilot CLI. Traditionally, developers must manually approve each command that Copilot suggests, but with --yolo, all tool calls and path accesses are approved automatically. This allows Copilot to execute commands autonomously without user intervention.

Key Features

  • Bypassing Manual Approvals: The --yolo command lets the agent skip manual confirmations, making the workflow more efficient when repetitive approvals are not needed.
  • Best Uses: Particularly useful when working in containerized environments or automated testing scenarios, where frequent human approvals would slow progress.
  • Caution: Granting autonomous execution means Copilot has more power, so use it only in trusted, isolated, or disposable environments.

Example Use Case

  • Running installation scripts or repetitive tasks inside a Docker container, letting Copilot handle command execution without stopping for manual checks.

Why Use YOLO Mode?

  • Increases development speed for specific use cases
  • Reduces constant interactions for approvals
  • Facilitates smoother automation in controlled settings

“Letting Copilot run autonomously with –yolo drops the friction in development pipelines that rely on repetitive command approvals.”

Additional Resources

For more Copilot CLI tips, follow GitHub on your favorite platform.