-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
75 lines (66 loc) · 3.83 KB
/
.env.example
File metadata and controls
75 lines (66 loc) · 3.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# Primer Configuration
# Copy to .env and fill in values. All variables use the PRIMER_ prefix.
# ── Core ──────────────────────────────────────────────────────────
PRIMER_DATABASE_URL=sqlite:///./primer.db
PRIMER_ADMIN_API_KEY=primer-admin-dev-key
PRIMER_SERVER_HOST=0.0.0.0
PRIMER_SERVER_PORT=8000
PRIMER_LOG_LEVEL=info
PRIMER_CORS_ORIGINS=["http://localhost:5173"]
PRIMER_BASE_URL=http://localhost:5173
# ── GitHub OAuth (for dashboard login) ────────────────────────────
# 1. Go to https://github.com/settings/developers
# 2. Click "New OAuth App"
# 3. Set Homepage URL: http://localhost:5173
# 4. Set Authorization callback URL: http://localhost:5173/auth/callback
# 5. Copy Client ID and Client Secret below
PRIMER_GITHUB_CLIENT_ID=
PRIMER_GITHUB_CLIENT_SECRET=
PRIMER_GITHUB_REDIRECT_URI=http://localhost:5173/auth/callback
# ── GitHub App (for PR sync, repo metadata, AI readiness) ────────
# 1. Go to https://github.com/settings/apps
# 2. Click "New GitHub App"
# 3. Set Homepage URL: http://localhost:5173
# 4. Set Webhook URL: https://<your-tunnel>/api/v1/webhooks/github
# (use ngrok/cloudflared for local dev, or leave blank to skip webhooks)
# 5. Permissions needed:
# - Repository > Contents: Read-only (for AI readiness file checks)
# - Repository > Pull requests: Read-only (for PR sync)
# - Repository > Metadata: Read-only (automatic with any repo permission)
# 6. Subscribe to events: Pull request, Push
# 7. Generate a private key (.pem file)
# 8. Install the app on your account/org, note the installation ID
# (visible in the URL: https://github.com/settings/installations/<ID>)
# PRIMER_GITHUB_APP_ID=123456
# For the private key, either:
# a) Paste the PEM content with \n for newlines:
# PRIMER_GITHUB_APP_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----\nMIIE...\n-----END RSA PRIVATE KEY-----"
# b) Or use $(cat path/to/key.pem) in your shell before starting the server
# PRIMER_GITHUB_APP_PRIVATE_KEY=
# PRIMER_GITHUB_INSTALLATION_ID=78901234
# PRIMER_GITHUB_WEBHOOK_SECRET=
# ── JWT (for dashboard auth tokens) ──────────────────────────────
# Generate a secure secret: python -c "import secrets; print(secrets.token_urlsafe(32))"
PRIMER_JWT_SECRET_KEY=change-me-in-production
PRIMER_JWT_ACCESS_TOKEN_EXPIRE_MINUTES=15
PRIMER_JWT_REFRESH_TOKEN_EXPIRE_DAYS=7
# ── Productivity / ROI ────────────────────────────────────────────
PRIMER_PRODUCTIVITY_TIME_MULTIPLIER=3.0
PRIMER_PRODUCTIVITY_HOURLY_RATE=75.0
# ── Rate Limiting ─────────────────────────────────────────────────
PRIMER_RATE_LIMIT_ENABLED=true
PRIMER_RATE_LIMIT_DEFAULT=60/minute
PRIMER_RATE_LIMIT_INGEST=120/minute
PRIMER_RATE_LIMIT_AUTH=10/minute
# ── Anthropic API (for narrative insights) ───────────────────────
# Get an API key from https://console.anthropic.com/settings/keys
# PRIMER_ANTHROPIC_API_KEY=sk-ant-api03-...
# ── Slack Notifications ───────────────────────────────────────────
PRIMER_SLACK_WEBHOOK_URL=
PRIMER_SLACK_ALERTS_ENABLED=false
# ── Alert Thresholds ──────────────────────────────────────────────
PRIMER_ALERT_FRICTION_SPIKE_MULTIPLIER=2.0
PRIMER_ALERT_USAGE_DROP_RATIO=0.5
PRIMER_ALERT_COST_SPIKE_WARNING=2.0
PRIMER_ALERT_COST_SPIKE_CRITICAL=3.0
PRIMER_ALERT_SUCCESS_RATE_DROP_PP=20.0