Before you begin
Make sure you have the following installed:- Docker installed and running
- Git installed
- Python 3.11+ with uv
Install Potpie
Configure your environment
.env and fill in the values — see .env.template in the repository for all required and optional fields including LLM provider, database, Redis, and storage settings.Set isDevelopmentMode=enabled to parse local repositories directly, or isDevelopmentMode=disabled to use GitHub-connected repos.Install dependencies
.venv directory and installs all dependencies from pyproject.toml.Start all services
Set up the frontend
Configure GitHub authentication
Potpie supports three methods for accessing GitHub repositories. The method is selected automatically based on which environment variables are set. GitHub App (recommended for production)Your GitHub App’s numeric ID. Found in the app’s settings page on GitHub.
The private key generated when you created the GitHub App.
.env:
| Scope | Permission |
|---|---|
| Repository Contents | Read only |
| Repository Metadata | Read only |
| Repository Pull requests | Read and write |
| Repository Secrets | Read only |
| Repository Webhooks | Read only |
| Organization Members | Read only |
| Account Email address | Read only |
Personal Access Token Pool (recommended for development)
A comma-separated list of GitHub personal access tokens with
repo scope. Potpie randomly selects from the pool for load balancing. Each token allows 5,000 requests per hour.Unauthenticated (public repositories only) No configuration required. Rate-limited to 60 requests per hour. Not recommended for anything beyond initial testing.
Use a self-hosted Git provider
For self-hosted Git servers such as GitBucket, set the following in.env:
The Git provider to use. Accepted values:
github, gitbucket.Base URL of your self-hosted Git server’s API.
Access token for your self-hosted Git server.
GH_TOKEN_LIST tokens are always used for GitHub.com requests regardless of what CODE_PROVIDER_BASE_URL is set to.Enable observability with Logfire (optional)
Logfire provides LLM trace monitoring for Potpie. Get a token at logfire.pydantic.dev and add it to.env:
Your Logfire project token. Tracing is initialized automatically on startup once this is set. View traces at logfire.pydantic.dev.
Set to
false to disable sending traces to Logfire cloud and keep all trace data local.
