CodePilot
Getting Started

Installation

Set up CodePilot locally with step-by-step instructions for cloning, installing dependencies, configuring Docker, and starting all services.

This guide walks you through setting up CodePilot on your local machine. By the end, you will have the full stack running — frontend, API, worker, PostgreSQL, Redis, and Ollama.

Prerequisites

Before you begin, make sure you have the following installed:

Why Ollama?

CodePilot uses Ollama to run AI models locally. No external API keys or cloud services are required — everything runs on your machine.

Step-by-Step Setup

Clone the Repository

git clone https://github.com/lovesinghal31/codepilot.git
cd codepilot

Install Dependencies

CodePilot uses pnpm workspaces to manage the monorepo. Install all dependencies from the root:

pnpm install
npm install
yarn install
bun install

Use pnpm

CodePilot is configured as a pnpm workspace. Using npm or yarn may cause dependency resolution issues. We strongly recommend pnpm.

Start Infrastructure Services

Start PostgreSQL (with pgvector) and Redis using Docker Compose:

docker compose up -d

This starts:

  • PostgreSQL (pgvector/pgvector:pg18) on port 5432
  • Redis Stack on port 6379 (with RedisInsight on port 8001)

Start Ollama and Pull Models

Start Ollama, then pull the required AI models:

ollama pull nomic-embed-text
ollama pull qwen2.5-coder:3b
ollama pull qwen2.5:7b
ModelPurposeSize
nomic-embed-textGenerating 768-dimensional vector embeddings~274 MB
qwen2.5-coder:3bCode chat and PR review responses~1.9 GB
qwen2.5:7bRepository overview and health analysis~4.4 GB

Configure Environment Variables

Copy the environment files and update them with your configuration:

cp .env.example .env
cp .env.api.example .env.api
cp .env.worker.example .env.worker
cp .env.web.example .env.web

See the Environment Variables page for a complete reference of all required variables.

GitHub App Required

For GitHub OAuth and webhook functionality, you need to create a GitHub App. See Authentication for setup instructions.

Run Database Migrations

Generate the Prisma client and apply migrations:

pnpm --filter @repo/db run db:generate
pnpm --filter @repo/db run db:migrate

Start All Services

Start the entire development stack with a single command:

pnpm dev

This starts all services concurrently via Turborepo:

Verify Installation

Once everything is running, verify the setup:

  1. Open http://localhost:3000 — you should see the CodePilot dashboard
  2. Open http://localhost:8080/api/health — the API health check should return 200 OK
  3. Open http://localhost:8001 — RedisInsight should show the connected Redis instance

Next Steps

On this page