.env.example to .env and configure the required variables to get started.
Required Variables
These variables must be set for Nectr to start and review PRs.AI Configuration
string
required
string
default:"claude-sonnet-4-5-20250929"
The Claude model to use for PR reviews.
Database
string
required
PostgreSQL connection string with asyncpg driver.Recommended: Use Supabase free tier.Navigate to: Dashboard → Connect → Connection Pooling → Session Mode (port 5432)
GitHub OAuth
string
required
string
required
GitHub OAuth App client secret.
string
required
GitHub Personal Access Token (Classic) with
repo scope.Used to post PR review comments on behalf of your account.Create at: github.com/settings/tokens → Generate new token (classic)Required scope: repo (Full control of private repositories)Authentication
string
required
Secret key for JWT signing and token encryption.Generate a secure random key:
string
default:"HS256"
JWT signing algorithm.
integer
default:"1440"
JWT token expiration time in minutes (default: 24 hours).
URLs
string
required
Public URL where your backend API is hosted.This URL is used for:
- GitHub webhook callback endpoints
- OAuth redirect URIs
string
required
Public URL where your frontend is hosted.Used for redirects after authentication.
Neo4j Knowledge Graph
string
required
Neo4j connection URI.Enables file-expert maps and related-PR context in every review.Get a free instance at: neo4j.com/cloud/platform/aura-graph-database
string
default:"neo4j"
Neo4j username.
string
required
Neo4j password.
Mem0 Memory Layer
string
required
Mem0 API key for semantic memory storage.Enables per-project patterns and per-developer learned habits.Get your API key at: mem0.ai
Optional Variables
These variables enable optional features. Leave blank to disable.MCP Integrations
Pull live context (issues, errors, messages) into every review. Each integration is independent — set only the ones you use.Linear Integration
Linear Integration
Sentry Integration
Sentry Integration
Slack Integration
Slack Integration
string
Slack MCP server base URL for fetching relevant channel messages.
Slack Bot (Direct Notifications)
string
Slack Bot User OAuth Token for direct notifications.This is separate from the MCP Slack integration above.
string
Slack app signing secret for verifying webhook requests.
Webhook Security
string
Global fallback webhook secret.Per-repo secrets are stored in the database automatically when you connect a repo. This global secret is only used as a fallback if no per-repo secret is found.
Feature Flags
boolean
default:"false"
Enable parallel review mode with 3 specialized agents.
false(default): Single agentic review loop (faster, less token usage)true: 3 specialized agents run in parallel (security / performance / style)
How Parallel Agents Work
How Parallel Agents Work
When enabled, Nectr runs three specialized agents concurrently:
- Security Agent - Focuses on vulnerabilities, authentication, data validation
- Performance Agent - Analyzes efficiency, database queries, caching
- Style Agent - Reviews code style, patterns, and maintainability
- ✅ More thorough, specialized analysis
- ✅ Parallel execution can be faster for large PRs
- ❌ Higher token usage (4x Claude API calls)
- ❌ Slightly higher cost per review
App Settings
Safe to leave as-is for local development.string
default:"Nectr"
Application name.
string
default:"development"
Application environment.
development- Development mode (CORS relaxed, debug enabled)production- Production mode (CORS strict, webhook signature verification enforced)
boolean
default:"true"
Enable debug mode.
string
default:"DEBUG"
Logging level.Options:
DEBUG, INFO, WARNING, ERROR, CRITICALstring
default:"0.0.0.0"
Server host binding.
integer
default:"8000"
Server port.
Example Configuration
Minimal Configuration (Required Only)
Minimal Configuration (Required Only)
Full Configuration (All Features)
Full Configuration (All Features)
Next Steps
OAuth Setup
Configure GitHub OAuth App for user authentication
Webhooks
Learn how webhooks are configured and verified