GitHub Integration Sample
Automate GitHub issue analysis with AI. Mention@cline in any issue comment to trigger an autonomous investigation that reads files, analyzes code, and provides actionable insights - all running automatically in GitHub Actions.
New to Cline CLI? This sample assumes you understand Cline CLI basics and have completed the Installation Guide. If you’re new to Cline CLI, we recommend starting with the GitHub RCA sample first, as it’s simpler and will help you understand the fundamentals before setting up GitHub Actions.
The Workflow
Trigger Cline by mentioning@cline in any issue comment:


Prerequisites
Before you begin, you’ll need:- Cline CLI knowledge - Completed the Installation Guide and understand basic usage
- GitHub repository - With admin access to configure Actions and secrets
- GitHub Actions familiarity - Basic understanding of workflows and CI/CD
- API provider account - OpenRouter, Anthropic, or similar with API key
Setup
1. Copy the Workflow File
Copy the workflow file from this sample to your repository. The workflow file must be placed in the.github/workflows/ directory in your repository root for GitHub Actions to detect and run it. In this case, we’ll name it cline-responder.yml.
.github/workflows/cline-responder.yml:
Click to view the complete cline-responder.yml workflow
Click to view the complete cline-responder.yml workflow
You MUST edit the workflow file before committing!Open Example: If your repository is This tells the workflow where to download the analysis script from your repository after you commit it in step 3.
.github/workflows/cline-responder.yml and update the “Download analyze script” step within the workflow to specify your GitHub organization and repository where the analysis script is stored:github.com/acme/myproject, set:@cline mentions, and then
start up an instance of the Cline CLI to dig into the issue, providing feedback
as a reply to the issue.
2. Configure API Keys
Add your AI provider API keys as repository secrets:- Go to your GitHub repository
-
Navigate to Settings → Environment and Add a new environment.
Make sure to name it “cline-actions” so that it matches the

environmentvalue at the top of thecline-responder.ymlfile. - Click New repository secret
-
Add a secret for the
OPENROUTER_API_KEYwith a value of an API key from openrouter.com.
-
Verify your secret is configured:

3. Add Analysis Script
Add the analysis script from thegithub-issue-rca sample to your repository. First, you’ll need to create a git-scripts directory in your repository root where the script will be located. Choose one of these options:
Option A: Download directly (Recommended)
Click to view the complete analyze-issue.sh script
Click to view the complete analyze-issue.sh script
4. Commit and Push
Usage
Once set up, simply mention@cline in any issue comment:
- Detect the
@clinemention - Start a Cline CLI instance
- Download the analysis script
- Analyze the issue using act mode with yolo (fully autonomous)
- Post Cline’s analysis as a new comment
How It Works
The workflow (cline-responder.yml):
- Triggers on issue comments (created or edited)
- Detects
@clinementions (case-insensitive) - Installs Cline CLI globally using npm
- Creates a Cline instance using
cline instance new - Configures authentication using
cline config set open-router-api-key=... --address ... - Downloads the reusable
analyze-issue.shscript from thegithub-issue-rcasample - Runs analysis with the instance address
- Posts the analysis result as a comment
Related Samples
- github-issue-rca: The reusable script that powers this integration

