← Back to Dashboard
Advanced Module

GitHub Copilot CLI

Bringing the power of GitHub Copilot directly to your terminal for agentic workflows.

1. Introduction

The GitHub Copilot CLI allows you to use Copilot directly from your terminal. It acts as a powerful AI agent that can answer questions, write and debug code, and interact with GitHub.com.

Supported OS: Linux, macOS, Windows (Powershell/WSL).


2. Modes of Use

A. Interactive Mode

Command: copilot

The default mode where you can have a conversation with Copilot, prompt it to answer questions, or perform tasks iteratively.

B. Plan Mode

Activation: Press Shift+Tab in interactive mode.

Copilot analyzes your request, asks clarifying questions, and builds a structured implementation plan before writing code. This is crucial for complex, multi-step tasks to prevent errors.

C. Programmatic Mode

Command: copilot -p "Your prompt"

Pass a single prompt directly from the command line. Useful for scripting or quick one-off tasks.

copilot -p "Summarize this week's commits" --allow-tool 'shell(git)'

3. Key Use Cases

Local Project Tasks

GitHub.com Integration


4. Customization & Tools

Copilot CLI supports several ways to extend its capabilities:


5. Security & Trust

Trusted Directories

Copilot CLI asks you to trust the specific directory you are working in. Only launch it from safe locations.

Tool Approvals

When Copilot needs to execute a command (like rm or git), it asks for permission:

  1. Yes: Allow once.
  2. Yes, always for this session: Allow this tool for the entire session.
  3. No: Reject and steer.

Automation Flags: Use --allow-tool 'shell(git)' or --allow-all-tools (Use with caution!) for headless operation.


6. Advanced Features