An AI-powered "Ralph loop" runner for automated development workflows using the GitHub Copilot SDK.
Coralph automates routine coding tasks by running an AI assistant in a loop that:
- Reads open GitHub issues → 2. Breaks them into tasks → 3. Implements changes → 4. Runs tests → 5. Commits code → Repeat
Download pre-built binary (recommended):
| Platform | Binary |
|---|---|
| Windows | Coralph-win-x64.exe |
| macOS Intel | Coralph-osx-x64 |
| macOS ARM | Coralph-osx-arm64 |
| Linux | Coralph-linux-x64 |
# macOS/Linux: Make executable
chmod +x Coralph-*Or build from source (requires .NET SDK 10):
dotnet publish src/Coralph -c Release -r linux-x64 --self-containedInstall as a .NET tool (requires .NET SDK 10):
dotnet tool install -g Coralph
coralph --versionIf you use dnx, you can run directly from NuGet without installing:
dnx Coralph -- --version# 1. Navigate to your repository
cd your-repo
# 2. Initialize (auto-detects tech stack)
./coralph --init
# 3. (Optional) Fetch GitHub issues
./coralph --refresh-issues --repo owner/repo-name
# 4. Run the loop
./coralph --max-iterations 10
# Alternative: run from anywhere by targeting a repository path
./coralph --working-dir /path/to/your-repo --max-iterations 10The init command creates issues.json, progress.txt, coralph.config.json, and a prompt.md template for your tech stack (Python, JavaScript, Go, Rust, or .NET) using only the Coralph binary.
./coralph --max-iterations 10 # Run 10 iterations
./coralph --refresh-issues --repo owner/name # Fetch GitHub issues
./coralph --init # Initialize repository artifacts
./coralph --demo # Launch demo mode with mock UI data
./coralph --working-dir /path/to/repo --init # Target a repo without cd
./coralph --version # Show version
./coralph --help # Show all options- Architecture – Component diagrams and data flow
- Using with Other Repos – Adapt for Python, JS, Go, Rust
- Changelog – Release history
git clone https://github.com/dariuszparys/coralph.git && cd coralph
dotnet restore && dotnet build && dotnet testjust ci # Full CI pipeline (restore, build, test)
just build # Build solution
just test # Run tests
just changelog unreleased # Refresh Unreleased section from latest commits
just changelog v1.0.0 # Generate changelog
just tag v1.0.0 # Create release tagSee CONTRIBUTING.md for workflow details and commit conventions.
git config core.hooksPath .githooks # Enable formatting checksjust changelog v1.0.0 # Generate changelog from commits
git add CHANGELOG.md && git commit -m "docs: changelog v1.0.0" && git push
just tag v1.0.0 # Create and push tag (triggers release)After a published release, GitHub Actions now bumps src/Coralph/Coralph.csproj to the next -dev patch version automatically.
To bump development version manually (patch/minor/major):
just bump-dev patch
just bump-dev minor
just bump-dev majorRun iterations in isolated containers:
./coralph --max-iterations 5 --docker-sandbox true
./coralph --docker-sandbox true --docker-image ghcr.io/devcontainers/dotnet:10.0Fetch work items from Azure DevOps:
./coralph --refresh-issues-azdo --azdo-organization https://dev.azure.com/myorg --azdo-project MyProjectEmit JSONL for integrations:
./coralph --stream-events true 1>events.jsonl 2>console.logWhen --stream-events true is enabled, Coralph forces classic console output to preserve machine-readable JSONL on stdout.
Coralph defaults to an interactive TUI in terminals, with automatic fallback to classic output when input/output is redirected.
./coralph --ui auto # Default: TUI for interactive terminals, classic otherwise
./coralph --ui tui # Force TUI
./coralph --ui classic # Force classic console output
./coralph --demo # Demo mode with mock data (no backend writes)By default Coralph uses an allow-all posture: every tool request from the Copilot agent is approved automatically so unattended loop runs never stall.
Use --tool-deny to block specific tools while keeping everything else allowed. Use --tool-allow to create an explicit allowlist; any tool not on the list will be denied.
./coralph --tool-deny bash,read_file # Block specific tools; everything else allowed
./coralph --tool-allow list_open_issues # Allow only listed tools; everything else deniedDeny takes precedence over allow when both lists are non-empty.
Set the client name sent to the Copilot session (defaults to coralph):
./coralph --client-name my-automationThis value is passed to SessionConfig.ClientName and can also be set via the config file.
Control the model's reasoning budget (low, medium, or high). Omit to use the model's default:
./coralph --reasoning-effort highPassed as SessionConfig.ReasoningEffort. Not all models respect this setting.
The Copilot SDK provides OnPreToolUse, OnPostToolUse, and OnUserInputRequest callbacks on SessionConfig. Coralph intentionally does not implement them:
- Tool-use hooks are unnecessary because
CopilotSessionEventRouteralready captures all tool events viasession.On(). - User-input handlers are inappropriate for an unattended loop; models should not prompt for interactive input during an automated run.
Use an OpenAI-compatible provider with optional base URL and wire API overrides:
./coralph --provider-type openai --provider-api-key sk-your-key \
--provider-base-url https://api.your-provider.example/v1 \
--provider-wire-api openaiOpenRouter is supported as a first-class provider type. The base URL (https://openrouter.ai/api/v1) is set automatically — no need to pass --provider-base-url.
# Minimal usage — model defaults to whatever the Copilot SDK selects
./coralph --provider-type openrouter --provider-api-key sk-or-xxxxx
# Select a specific model via --provider-wire-api
./coralph --provider-type openrouter --provider-api-key sk-or-xxxxx \
--provider-wire-api anthropic/claude-3.5-sonnetOr via coralph.config.json:
{
"LoopOptions": {
"ProviderType": "openrouter",
"ProviderApiKey": "sk-or-xxxxx",
"ProviderWireApi": "anthropic/claude-3.5-sonnet"
}
}Do not commit API keys to source control. Use the OPENROUTER_API_KEY environment variable, secrets, or local configuration for --provider-api-key or config overrides.
See ./coralph --help for all options.
| File | Purpose |
|---|---|
prompt.md |
AI instructions for your codebase |
issues.json |
Cached GitHub issues |
generated_tasks.json |
Task backlog from issues |
progress.txt |
Completed work log |
coralph.config.json |
Configuration overrides |
The loop stops when the AI outputs COMPLETE or no open issues remain.
- Create
examples/<stack>-prompt.mdwith build/test commands - Update
--initdetection logic for your manifest files (see src/Coralph/Program.cs) - Submit a PR – see CONTRIBUTING.md