-
Notifications
You must be signed in to change notification settings - Fork 0
Setup Guide
GSD Planner edited this page May 26, 2026
·
1 revision
This page covers prerequisites, runner registration, and running agent/poll_once.py locally for development.
| Requirement | Notes |
|---|---|
| Python 3.12 | Required by agent/poll_once.py (uses str | None union syntax from 3.10+) |
GitHub CLI (gh) |
Required for runner registration and API operations |
| Git | Required for repo operations |
| Windows (self-hosted runner) | The production runner runs as a Windows service on MyLocalPC
|
GH_TOKEN or GITHUB_TOKEN
|
Required by the agent to call the GitHub REST API |
| Variable | Required | Description |
|---|---|---|
GH_TOKEN |
Yes | GitHub personal access token with repo and workflow scopes |
GITHUB_TOKEN |
Alternative | Injected automatically inside GitHub Actions jobs |
GITHUB_REPOSITORY |
Optional | Override target repo (default: Coding-Autopilot-System/ci-autopilot) |
GITHUB_OWNER |
Optional | Override org/owner (default: Coding-Autopilot-System) |
GITHUB_REPO |
Optional | Override repo name (default: ci-autopilot) |
# Clone the repo
git clone https://github.com/Coding-Autopilot-System/ci-autopilot.git
cd ci-autopilot
# Set your token
export GH_TOKEN=<your_github_token>
# Run the agent (no pip install needed — stdlib only)
python -m agent.poll_onceThe agent will print the count of queued issues and list the first 5 for review.
cd C:\actions-runner
gh auth login -s repo,workflow,read:org,admin:org
gh auth status$removeToken = gh api -X POST repos/OgeonX-Ai/enterprise-ai-gateway/actions/runners/remove-token -q .token
.\config.cmd remove --token $removeToken$regToken = gh api -X POST repos/Coding-Autopilot-System/ci-autopilot/actions/runners/registration-token -q .token
.\config.cmd --unattended `
--url https://github.com/Coding-Autopilot-System/ci-autopilot `
--token $regToken `
--name MyLocalPC `
--runasservice `
--replace$serviceName = Get-Content .\.service
Start-Service -Name $serviceName
Get-Service -Name $serviceNamegh api repos/Coding-Autopilot-System/ci-autopilot/actions/runners -q '.runners[] | {name, status, online}'Expected output: {"name":"MyLocalPC","status":"online","online":true}
- Registration and removal tokens are short-lived. Always fetch fresh tokens immediately before use.
- Use
-X POSTwithgh apifor all runner token endpoints. - The agent uses
requestsfallback toghCLI ifGITHUB_TOKEN/GH_TOKENis unavailable. - For full security posture and token rotation guidance see the Configuration Reference wiki page.
- docs/runner-setup.md — Full runner setup source
- Architecture — System design and component overview
- Configuration Reference — All secrets and operations runbook