GitHub Copilot
Integrate GitHub Copilot CLI with Ralph TUI for AI-assisted coding.
GitHub Copilot
The GitHub Copilot agent plugin integrates with GitHub's copilot CLI to execute AI coding tasks. It supports model selection and auto-approve mode for autonomous operation.
GitHub Copilot leverages your GitHub account and subscription for AI-powered code assistance directly from the command line.
Prerequisites
Verify installation:
Ensure you have an active GitHub Copilot subscription (Individual, Business, or Enterprise).
Basic Usage
Run with GitHub Copilot
Use the --agent github-copilot flag:
Select a Model
Override the model with --model:
Configure Auto-Approve
Enable auto-approve in config:
Configuration
Shorthand Config
The simplest configuration:
Full Config
For advanced control:
Options Reference
| Option | Type | Default | Description |
|---|---|---|---|
model | string | - | Model to use (e.g., gpt-4, gpt-3.5-turbo) |
autoApprove | boolean | true | Auto-approve operations for autonomous execution |
timeout | number | 0 | Execution timeout in ms (0 = no timeout) |
command | string | "copilot" | Path to Copilot CLI executable |
Auto-Approve Mode
When autoApprove is enabled (default), GitHub Copilot will execute operations without prompting for confirmation. This is required for Ralph TUI's autonomous operation.
With autoApprove enabled, Copilot will make changes without confirmation. Review your PRD carefully before running.
How It Works
When Ralph TUI executes a task with GitHub Copilot:
- Build command: Constructs
copilot [options] - Pass prompt via stdin: Avoids shell escaping issues with special characters
- Stream output: Captures stdout/stderr in real-time
- Handle exit: Reports success, failure, or timeout
CLI Arguments
Ralph TUI builds these arguments:
Troubleshooting
"GitHub Copilot CLI not found"
Ensure Copilot is installed and in your PATH:
"Execution timeout"
Increase the timeout for complex tasks:
"Authentication failed"
Authenticate with GitHub Copilot using one of the following methods:
Method 1: Interactive Login
Run the copilot command and use the /login command at the prompt:
Method 2: Non-Interactive (Token)
Set GH_TOKEN or GITHUB_TOKEN to a fine-grained Personal Access Token (PAT) that includes the "Copilot Requests" permission:
Next Steps
- Claude Agent - Anthropic's Claude Code
- Cursor Agent - Cursor Agent CLI
- Gemini Agent - Google's Gemini CLI
- Configuration - Full options reference