Analyze a bug description against a local repository using the GitHub Copilot SDK.
- Bun
- GitHub Copilot CLI installed and authenticated (
copilot --version)
Before running the application, perform these steps:
- Download and install the GitHub Copilot CLI for your platform (see https://github.com/github/copilot-cli or use your package manager).
- Log in to the GitHub Copilot CLI locally (e.g.
copilot login) — the program uses the locally installed Copilot CLI.
bun installbun run index.ts /path/to/bug.jsonHelp:
bun run index.ts --help[
{
"title": "Bug title",
"description": "Detailed description of the bug",
"status": "todo",
"bug-details": null,
"localRepoUrls": ["/absolute/path/to/local/repo"],
"imagePaths": ["/absolute/path/to/screenshot.png"]
}
]Notes:
statusis optional; omitted status is treated astodo.- If provided,
statusmust be one oftodo,in-progress, ordone. bug-detailsis optional and is populated with structured findings after analysis.localRepoUrl(string) is still supported for a single repository entry.imagePathsis optional.- Each bug entry with
todoorin-progressis processed and then updated todone.
The model response is requested in JSON and parsed into each entry's bug-details object:
probableCausereasonsuggestedFixesconfidenceScore(0–1)evidence(when available)
Progress and tool status updates are printed to stderr.
- Optional model override: set
COPILOT_MODEL(defaults togpt-4.1). - Optional CLI path override: set
COPILOT_PATH(defaults to~/.local/bin/copilot). - Repositories missing
bug-finder.mdreceive an auto-generated architecture index produced via the Copilot SDK before analysis runs. - This project was created using
bun initin bun v1.3.9. Bun is a fast all-in-one JavaScript runtime.