Skip to content

Getting Started with Colony

Go from git clone to watching Colony process its first issue in under 30 minutes.

Audience: A senior engineer comfortable with TypeScript, GitHub, and containers evaluating Colony on a test repo.

This is the single starting point for new users. Everything you need is on this page. Reference docs are linked for deeper dives but are never required reading:

CLI note: All colony commands use npx colony since the CLI is a workspace dependency. Alternatively, run npm link in packages/cli to make colony available globally.


The fastest path. One command launches an interactive wizard that walks you through each setup step:

Terminal window
git clone https://github.com/RunColony/colony.git
cd colony
npm install && npm run build
# Interactive wizard: prompts for API keys, config, database, and starts agents
npx colony quickstart

The wizard guides you through six phases:

🚀 Colony Quickstart
This wizard will guide you through setting up Colony step by step.
── Step 1: Environment
Validate prerequisites and API keys
── Step 2: Repository
Configure your target repository
── Step 3: Database
Set up the Colony database
── Step 4: Cost Preview
Understand and configure cost limits
── Step 5: Launch
Write config, initialize repo, and start agents
── Step 6: First Issue
Create a test issue to see Colony in action

The command is idempotent — running it again skips completed steps and detects already-running agents.

If quickstart completes successfully, skip to Step 6: Process Your First Issue.

If you prefer fine-grained control over each step, follow the manual setup below.


Before you begin:

  • Node.js 20+node --version should print v20.x or higher
  • Gitgit --version
  • Claude Code CLInpm install -g @anthropic-ai/claude-code, then verify with claude --version
  • Anthropic API key — get one at console.anthropic.com
  • GitHub account with a test repository (public or private)
Platform-specific install commands

Node.js 20+

Terminal window
# macOS (Homebrew)
brew install node@20
# Other platforms — see https://nodejs.org

Git

Terminal window
git --version

If not installed: xcode-select --install (macOS) or your platform’s package manager.

Claude Code CLI

Terminal window
npm install -g @anthropic-ai/claude-code
claude --version
Container runtime setup (optional)

Colony can run as containers (Docker or Apple Container) or as native Node.js processes. Containers are recommended for production; native is fine for evaluation.

Docker Desktop

Terminal window
# macOS
brew install --cask docker
# Linux — see https://docs.docker.com/engine/install/

Apple Container (macOS only)

Requires macOS 15+ and Apple Silicon.

Terminal window
brew install container
container system start
container system property set build.rosetta false

Resource recommendations

DeploymentWorkersMemoryCPUsDisk
Single repo (eval)18 GB450 GB
Single repo (prod)2-316 GB8100 GB
Multi-repo3+32 GB16200 GB

For the full prerequisites reference, see Installation Guide.

Next: Choose your deployment mode.


This affects how you set up the database and how Colony runs. Pick one before configuring anything else.

ModeBest forDatabaseHow agents run
Docker ComposeFirst-time users, productionBundled (included in compose)docker compose up -d
Apple ContainermacOS with Apple SiliconExternal (Neon or local Docker)./scripts/colony-container.sh up -d
NativeQuick local evaluationExternal (Neon or local Docker)npx colony start

Recommendation: Use Docker Compose for your first setup — it bundles Postgres and requires the least configuration. Use Native if you want the simplest possible evaluation without containers.

Next: Set up your database.


Colony stores pipeline state in Postgres.

If you chose Docker Compose: Skip this step — Postgres is included. Jump to Step 4.

If you chose Native or Apple Container, pick one:

Option A: Neon (free hosted Postgres)

  1. Sign up at neon.tech — free tier is sufficient.
  2. Create a project and database.
  3. Copy the connection string (includes ?sslmode=require).
Terminal window
export DATABASE_URL="postgresql://user:pass@ep-xxx.us-east-2.aws.neon.tech/colony?sslmode=require"

Option B: Local Docker Postgres

Terminal window
docker run -d --name colony-pg -e POSTGRES_USER=colony -e POSTGRES_PASSWORD=colony -e POSTGRES_DB=colony -p 5432:5432 postgres:17-alpine
export DATABASE_URL="postgresql://colony:colony@localhost:5432/colony"

Migrations run automatically when agents start — no manual migration step needed.

Next: Configure Colony.


Terminal window
git clone https://github.com/RunColony/colony.git
cd colony
npm install && npm run build

Colony needs access to your GitHub repository. For evaluation, a Personal Access Token is quickest:

  1. Go to github.com/settings/tokens and create a token.
  2. Required permissions: repo scope (classic) or Contents/Issues/Pull requests read-write (fine-grained).

For production use, a GitHub App provides higher rate limits and bot-attributed activity. See the GitHub App Setup Guide for instructions, including the dual-app setup needed for fully autonomous merging.

Alternatively, copy the annotated example config and edit it directly:

Terminal window
cp colony.config.example.yaml colony.config.yaml

Every required field is marked with a # CHANGE THIS: comment. This is the fastest path if you prefer editing a file over an interactive wizard.

Or use the interactive wizard:

Terminal window
npx colony init --generate

This prompts for your repo, auth method, database URL, local repo path, review checks (auto-detected from your project), and Claude model preference. It writes colony.config.yaml.

For the complete field reference, see Configuration Reference.

Terminal window
export GITHUB_TOKEN=ghp_your_token_here
export ANTHROPIC_API_KEY=sk-ant-your_key_here
# Skip if using Docker Compose (it bundles Postgres):
export DATABASE_URL=postgresql://colony:colony@localhost:5432/colony

Docker deployments: Copy .env.example to .env and set values there instead of exporting shell variables.

Next: Initialize your repo.


This creates Colony’s pipeline labels and branch protection on GitHub:

Terminal window
npx colony init -r your-org/your-repo

Expected output:

Initializing Colony for your-org/your-repo...
✓ Repository access validated
✓ XX pipeline labels created/verified
✓ Flag labels created/verified
✓ Branch protection ruleset configured
Terminal window
npx colony doctor

Fix any failures before starting. Common issues:

ErrorFix
Cannot access your-org/your-repoCheck token has repo scope and repo name is correct
Claude CLI not foundnpm install -g @anthropic-ai/claude-code
DATABASE_URL not setExport the connection string or use Docker Compose

Docker Compose:

Terminal window
cp .env.example .env
# Edit .env — set GITHUB_TOKEN, ANTHROPIC_API_KEY
docker compose build
docker compose up -d
# Verify:
docker compose ps
# All services should show "running (healthy)"

Apple Container (macOS):

Terminal window
./scripts/colony-container.sh build
./scripts/colony-container.sh up -d
# Verify:
./scripts/colony-container.sh health

Native:

Terminal window
npx colony start
# Verify:
npx colony status

Health check endpoints (all deployment modes):

Terminal window
curl -sf http://localhost:9100/health # sprint-master
curl -sf http://localhost:9200/health # worker
curl -sf http://localhost:9106/health # monitor + dashboard

Webhooks are optional. Colony works out of the box using polling (Sprint Master checks GitHub every 30 seconds). Webhooks provide near-instant response but aren’t needed for evaluation. See Webhook Setup to configure them later.

Next: Process your first issue.


Tips for writing a well-scoped first issue

Colony works best on issues that are small, self-contained, and clearly described. For your first issue, pick something that:

  • Has a single responsibility. One feature, one bug fix, or one refactor — not a combination.
  • Has clear acceptance criteria. Describe what “done” looks like so the analyzer can write a concrete plan.
  • Doesn’t require secrets or external services. Colony’s developer agent runs in an isolated worktree. It can read and write code, run build/test/lint commands, and interact with the local filesystem — but it cannot access external APIs, databases, or secret stores during implementation.
  • Touches a small number of files. Fewer than 5–10 files is ideal for a first run. Large cross-cutting changes are better handled after you’re comfortable with the pipeline.

Size guidance: A good first issue changes 1–3 files and under 200 lines total. Larger changes are more likely to hit the turn limit or require re-implementation cycles before reaching human-review-ready.

Example issue

Title: Add a greeting utility function

Body:

Add a `greet(name: string): string` function to `src/utils.ts` that returns
`Hello, {name}!`.
Acceptance criteria:
- Function is exported from `src/utils.ts`
- Returns the greeting string with the provided name
- Unit test in `src/__tests__/utils.test.ts` covers the happy path

What to avoid for a first issue

  • Vague descriptions (“improve the API” or “refactor the codebase”)
  • Issues requiring environment variables or API keys at runtime
  • Issues that depend on unreleased changes from other branches
  • Large epics — save those for after you understand the pipeline

On your test repo, create a GitHub issue:

  • Title: Add a hello-world endpoint
  • Body: Add a GET /hello endpoint that returns { "message": "Hello, World!" } as JSON.
  • Label: colony:enqueue

The colony:enqueue label tells Sprint Master to pick up this issue. Colony’s default intake_mode: tagged setting means only issues explicitly labeled colony:enqueue enter the pipeline — this gives you full control over which issues Colony processes.

To add the label in the GitHub UI: open your issue, click Labels in the right sidebar, search for colony:enqueue, and select it. The label is applied immediately.

Note: The colony:enqueue label is created automatically when you run npx colony init on your repo. If you don’t see it, re-run npx colony init -r owner/repo. To automatically process all new issues without labeling, set intake_mode: all under agents.sprint_master in your config.

Timing expectation: Sprint Master polls every 30 seconds. Your issue may take up to 60 seconds to be picked up. Run npx colony status (or docker exec colony-sprint-master colony status) to verify agents are running. If nothing happens after 2 minutes, check logs with npx colony logs or docker compose logs -f.

Open the dashboard at http://localhost:9106 for real-time pipeline status. The issue progresses through these states (visible as GitHub labels):

colony:enqueue → colony:new → colony:analyzing → colony:ready-for-dev → colony:in-development → colony:in-review → colony:human-review-ready
StageWhat Colony doesWhat you’ll see
new → analyzingSprint Master picks up the issue, enqueues analysisLabel changes to colony:analyzing
analyzingAnalyzer reads the issue, explores codebase, writes implementation planA comment appears on the issue with the plan
ready-for-devAnalysis complete, development queuedLabel changes to colony:ready-for-dev
in-developmentDeveloper creates worktree, implements via Claude Code, opens PRNew branch colony/issue-N and a PR appear
in-reviewReviewer runs build/test/lint, then LLM code reviewReview comments appear on the PR
human-review-readyAll automated checks passed — your turnReview and merge the PR on GitHub
Detailed pipeline stage breakdown

What happens: The Sprint Master picks up the issue on its next poll cycle (default: every 30 seconds). It creates a pipeline_issues row in Postgres and transitions the issue to new.

Where to lookWhat you’ll see
GitHubThe colony:enqueue label is replaced by colony:new
Dashboard (http://localhost:9106)The issue appears in the pipeline view with state new
LogsSprint Master logs: intake: picked up issue #N

What happens: The Sprint Master enqueues an analyze task in the work_tasks queue. A worker claims the task and runs the analyzer, which reads the issue body, explores the codebase, and writes an implementation plan.

Where to lookWhat you’ll see
GitHubLabel changes to colony:analyzing
DashboardIssue state updates to analyzing; worker activity shows the claimed task
LogsWorker logs: claimed task analyze for issue #N

What happens: The analyzer finishes and posts a comment on the issue with its implementation plan. The issue transitions to ready-for-dev, which enqueues a develop task.

Where to lookWhat you’ll see
GitHubLabel changes to colony:ready-for-dev. A new comment from Colony appears with the analysis plan
DashboardIssue state updates to ready-for-dev
LogsAnalyzer logs: analysis complete for issue #N

colony:ready-for-dev → colony:in-development

Section titled “colony:ready-for-dev → colony:in-development”

What happens: A worker claims the develop task. The developer agent creates a git worktree branched from origin/main, implements the changes using Claude Code, and opens a pull request.

Where to lookWhat you’ll see
GitHubLabel changes to colony:in-development. A new branch colony/issue-N appears. Eventually, a PR is opened
DashboardIssue state updates to in-development; worker activity shows active development
LogsDeveloper logs: creating worktree for issue #N, then Claude Code session output

Timing: Development is the longest phase. A simple issue typically takes 2–5 minutes; more complex issues can take 10–30 minutes depending on the Claude model and issue complexity.

colony:in-development → colony:in-review

Section titled “colony:in-development → colony:in-review”

What happens: The developer opens a PR and transitions the issue to in-review, which enqueues a review task. A worker claims it and the reviewer runs deterministic checks (build, test, lint) followed by an LLM-powered code review.

Where to lookWhat you’ll see
GitHubLabel changes to colony:in-review. Review comments appear on the PR
DashboardIssue state updates to in-review
LogsReviewer logs: running checks for PR #N, then review verdict

colony:in-review → colony:human-review-ready

Section titled “colony:in-review → colony:human-review-ready”

What happens: All automated checks passed and the reviewer’s LLM review is complete. The issue is now waiting for your approval.

Where to lookWhat you’ll see
GitHubLabel changes to colony:human-review-ready. The PR has Colony’s review comments and is ready for your review
DashboardIssue state updates to human-review-ready
LogsReviewer logs: review complete for PR #N, verdict: approve

Review cycle: If the reviewer finds issues, the PR goes through a colony:changes-requestedcolony:in-developmentcolony:in-review cycle before reaching human-review-ready. Each cycle incorporates the previous review feedback.

Development timing: A simple issue typically takes 2-5 minutes. Complex issues can take 10-30 minutes. If the reviewer finds issues, the PR goes through a changes-requested → in-development → in-review cycle automatically.

Terminal window
# Docker:
docker exec colony-sprint-master colony status
docker compose logs -f worker
# Native:
npx colony status
npx colony logs

Once the issue reaches human-review-ready, review the PR on GitHub. Colony took your issue from description to working code — a branch, tests (if applicable), and a pull request ready for your review.

For advanced topics (reading analyzer plans, slash commands, PR review workflow, and common gotchas), see First Issue Tutorial.

Cost Expectations

Each issue costs Anthropic API credits. Rough ranges based on issue complexity:

ComplexityTypical cost
Simple (add a field, fix a typo)$1–3
Medium (new endpoint, refactor)$5–15
Complex (new feature, large refactor)$15–50

Before starting: run npx colony estimate to preview your projected monthly spend based on expected throughput and your config.

For evaluation: add claude.max_cost_per_issue: 10 to your colony.config.yaml to cap each issue at $10. If an issue hits the cap, it moves to colony:blocked and Colony posts a comment explaining the spend. Raise the cap in config and remove the colony:blocked label to retry. See claude.max_cost_per_issue for details.

After each issue: run npx colony inspect <issue> to review the per-issue cost breakdown and timeline.


You’ve seen Colony process a single issue. Here’s where to go:

  • Process more issues — try different issue types and complexities. See First Issue Tutorial for scoping guidance.
  • Enable autonomous merging — set auto_merge_on_approval: true in config (requires dual-app setup)
  • Production deploymentDeployment Guide for hardened setup with monitoring, webhooks, and multi-repo support
  • Non-TypeScript repos — Colony supports any language. Configure workspace.setup_command and review.checks, and add .colony/conventions.md. See the Rails example.
  • Custom executorsSDK Guide for building your own pipeline stages
  • ConfigurationConfiguration Reference for all options
Terminal window
npx colony status # Pipeline status and agent health
npx colony metrics # Throughput, cycle times, success rates
npx colony inspect <issue> # Per-issue cost and timeline
npx colony doctor # Re-run setup validation
npx colony pause <issue> # Temporarily pause an issue
npx colony resume <issue> # Resume a paused issue
npx colony logs [agent] # Tail agent logs
npx colony safestop # Gracefully drain and stop all agents

Symptom: Cannot access your-org/your-repo or Authorization failed

Fix: Ensure your token or GitHub App has Contents, Issues, and Pull requests read-write permissions. For PATs, verify the repo scope is enabled.

Symptom: ANTHROPIC_API_KEY environment variable is not set or DATABASE_URL environment variable is not set

Fix: Export the missing variable, or add it to .env for Docker deployments. Run npx colony doctor to check all variables.

Symptom: Cannot connect to Postgres at host:port

Fix:

  • Docker Compose: check docker compose ps — the postgres service should be healthy
  • External Postgres: verify the connection string in DATABASE_URL
  • Neon: ensure ?sslmode=require in the connection string

Symptom: npx colony doctor reports Claude CLI not found or failed

Fix: npm install -g @anthropic-ai/claude-code, then verify with claude --version.

Symptom: docker compose ps shows a service as unhealthy

Fix: Check service logs (docker compose logs <service>). Common causes: config not mounted, port conflicts, database not ready.

Symptom: Issue label doesn’t change after several minutes, or no worker activity appears.

Fix:

  1. Run npx colony status to verify all agents are running.
  2. Check if the issue has a colony:blocked label — if so, the is_blocked flag was set by a transient failure. Comment /colony:retry on the issue to clear it and retry.
  3. Wait at least two poll cycles (60 seconds) — Sprint Master polls every 30 seconds.
  4. Run npx colony doctor to verify connectivity and configuration.
  5. Check logs with npx colony logs for specific errors.

Symptom: Issue stuck in colony:in-development for a long time, or Colony posts a comment saying the turn limit was reached.

Fix: Comment /colony:decompose on the issue to send it to the planner, which breaks it into smaller sub-issues. Alternatively, comment /colony:cancel to stop processing, then re-create the issue with a narrower scope. For your first issue, start with a single function, a simple bug fix, or a minor config change.

For comprehensive failure diagnosis, see Failure Modes Guide.


Colony provides four commands for validating different aspects of your setup. Use the right one for the situation:

colony doctor — Pre-start validation. Checks config syntax, GitHub access, API key presence, Claude CLI availability, database connectivity, repo clone, labels, ports, and review check scripts. Run this before starting agents to catch setup problems early.

colony preflight — Post-start validation. Checks that migrations have been applied, required tables exist, intake mode is configured, epic config is valid, and workers are responding. Run this after starting agents to verify end-to-end pipeline readiness.

colony status --check — Runtime diagnostics. Verifies config is readable, GitHub connectivity is live, and colony labels are present on the repo. Run this during normal operation to confirm the pipeline is healthy.

colony validate-config — Debug aid. Validates config syntax and env var presence, checks workspace directories, and dumps the effective config after applying defaults and synthesis. Run this when you’re unsure what config Colony is actually using.