Repository navigation
Expand file tree
/
Copy path.env.example
More file actions
134 lines (128 loc) · 5.96 KB
/
Copy path.env.example
File metadata and controls
134 lines (128 loc) · 5.96 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
R2_ACCOUNT_ID=
R2_ACCESS_KEY_ID=
R2_SECRET_ACCESS_KEY=
R2_PUBLIC_BUCKET=
R2_PRIVATE_BUCKET=
CACHE_KEY_SECRET=
UPSTASH_REDIS_REST_URL=
UPSTASH_REDIS_REST_TOKEN=
OPENAI_API_KEY=
# OPTIONAL: choose which provider to use for generation: openai | openrouter
AI_PROVIDER=openai
# OPTIONAL: model used for both generation stages when AI_PROVIDER=openai
OPENAI_MODEL=gpt-6-luna
# OPTIONAL: enable a daily complimentary-token cap. Leave false to use the
# server account's available credits without an application daily quota.
OPENAI_COMPLIMENTARY_GATE_ENABLED=false
OPENAI_COMPLIMENTARY_DAILY_LIMIT_TOKENS=10000000
OPENAI_COMPLIMENTARY_MODEL_FAMILY=gpt-6-luna
# OPTIONAL: per-IP throttle for generations billed to the server's own key.
# Callers supplying their own API key are not throttled.
GENERATION_RATE_LIMIT_MAX=8
GENERATION_RATE_LIMIT_WINDOW_SECONDS=3600
# OPTIONAL: looser per-IP throttle on /api/generate/cost and /stream for every
# caller, own API key included (bounds GitHub and session work).
GENERATION_INFRASTRUCTURE_RATE_LIMIT_MAX=60
GENERATION_INFRASTRUCTURE_RATE_LIMIT_WINDOW_SECONDS=3600
# OpenRouter credentials/model when AI_PROVIDER=openrouter. The key is also
# required for explainer videos (the narrator's voice).
OPENROUTER_API_KEY=
OPENROUTER_MODEL=openai/gpt-5.6-terra
OPENROUTER_SITE_URL=http://localhost:3000
OPENROUTER_APP_NAME=GitDiagram
NEXT_PUBLIC_POSTHOG_KEY=
# Server-only query-read key for the sponsor page's five-minute audience cache.
POSTHOG_PERSONAL_API_KEY=
POSTHOG_PROJECT_ID=113380
# OPTIONAL: sponsor events accepted per campaign per hour across all networks
# (a backstop far above real traffic; defaults 5000 clicks, 100000 impressions).
SPONSOR_CLICKS_PER_CAMPAIGN_HOUR=
SPONSOR_IMPRESSIONS_PER_CAMPAIGN_HOUR=
# OPTIONAL: show this campaign on non-production hostnames (preview
# deployments); the production hostnames ignore it.
SPONSOR_PREVIEW_CAMPAIGN=
# OPTIONAL: providing one or more GitHub PATs increases GitHub API rate limits.
GITHUB_PAT=
GITHUB_PATS=
# OPTIONAL: GitHub App auth (used when GITHUB_PAT is not provided)
# Either GITHUB_APP_ID or GITHUB_CLIENT_ID can be used as the GitHub App JWT issuer.
GITHUB_APP_ID=
GITHUB_CLIENT_ID=
GITHUB_PRIVATE_KEY=
GITHUB_INSTALLATION_ID=
# Bearer secret for the Vercel cron that drains the browse index
# (/api/internal/browse-index/drain, scheduled in vercel.json). Vercel sends it
# automatically when set; without it the route rejects every call.
CRON_SECRET=
# OPTIONAL: explainer videos (feature-flagged; off unless both flags are 1).
VIDEO_EXPLAINER_ENABLED=
NEXT_PUBLIC_VIDEO_EXPLAINER=
# Every video is written by Claude Opus and designed by GPT-6 Sol at medium
# effort, through OPENAI_API_KEY; if Opus fails (out of credit), Sol takes over.
# VIDEO_PREMIUM_OPUS_DESIGNS=1 has Opus design the premium videos too (big
# repositories, a priority visitor's first video each day, the operator's). Videos always
# need OPENAI_API_KEY (Sol and whisper-1) and OPENROUTER_API_KEY (the voice);
# ANTHROPIC_API_KEY only while a configured video model is a Claude model.
ANTHROPIC_API_KEY=
VIDEO_PLANNER_MODEL=
VIDEO_PLANNER_EFFORT=
VIDEO_PREMIUM_OPUS_DESIGNS=
VIDEO_STANDARD_MODEL=
VIDEO_STANDARD_EFFORT=
# Who writes the standard videos' scripts (default claude-opus-5-5); set it to
# the standard model (gpt-6-sol) to have Sol write them as well.
VIDEO_STANDARD_DIRECTOR_MODEL=
# Repositories with at least this many stars always get the premium model (default 10000).
VIDEO_PREMIUM_MIN_STARS=
# Admin API key (sk-ant-admin...) so /admin can show the Claude credit left.
ANTHROPIC_ADMIN_KEY=
# Videos are narrated through OpenRouter's text-to-speech (OPENROUTER_API_KEY
# above; Gemini 3.8 Flash TTS, voice Charon), and OPENAI_API_KEY's whisper-1
# times the words. When the OpenRouter balance runs out, new videos pause.
# local (default in development) writes .video-cache/; r2 (default in production)
# stores under video/v1/ in R2_PUBLIC_BUCKET.
VIDEO_STORE=
# Production budget for new videos (UTC day): overall (default 25), per person
# i.e. per browser (default 1; 3 in a priority place, the first 1 of them with
# the premium model), and a looser per-connection backstop so shared offices
# still work (default 10). Premium videos per connection default to twice the
# per-person number.
VIDEO_DAILY_LIMIT=
VIDEO_PERSON_DAILY_LIMIT=
VIDEO_PRIORITY_PERSON_DAILY_LIMIT=
VIDEO_PREMIUM_PERSON_DAILY_LIMIT=
VIDEO_PREMIUM_NETWORK_DAILY_LIMIT=
VIDEO_NETWORK_DAILY_LIMIT=
# New videos a connection may start per window, never refunded (default 10 per
# 3600 s); bounds the GitHub reads failing runs could repeat.
VIDEO_NETWORK_ATTEMPT_LIMIT=
VIDEO_NETWORK_ATTEMPT_WINDOW_SECONDS=
# Videos being made at once across every instance (default 10).
VIDEO_MAX_PAID_RUNS=
# MP4 renders started per UTC day (finished renders are cached and free):
# overall (default 300), per person (8) and per connection (40).
VIDEO_RENDER_DAILY_LIMIT=
VIDEO_RENDER_PERSON_DAILY_LIMIT=
VIDEO_RENDER_NETWORK_DAILY_LIMIT=
# Operator token (32+ chars): skips limits, may regenerate existing videos, and
# signs in to the /admin dashboard.
VIDEO_ADMIN_TOKEN=
# Local MP4 renders need a headless Chromium (Vercel uses @sparticuz/chromium).
VIDEO_RENDER_CHROME_PATH=
# Extra Chromium flags, space-separated (the Railway image passes
# --no-sandbox --disable-dev-shm-usage).
VIDEO_RENDER_CHROME_ARGS=
# Chromium renders one instance runs at once in production (default 2).
VIDEO_SEGMENT_CONCURRENCY=
# Segment requests one MP4 render keeps in flight (default 10).
VIDEO_SEGMENT_FAN_OUT=
# The origin the server calls itself on for renders. Default: the request's
# origin on Vercel, http://127.0.0.1:$PORT in a production container.
VIDEO_INTERNAL_ORIGIN=
# Development only: preview the paused video UI (audience | device | limit).
VIDEO_PREVIEW_PAUSED=
# OPTIONAL: live presence for /admin (workers/presence, a Cloudflare Worker).
# The worker's wss:// URL; also added to the CSP connect-src at build time.
NEXT_PUBLIC_PRESENCE_URL=
# Shared with the worker (`wrangler secret put PRESENCE_SECRET`), 32+ chars.
PRESENCE_SECRET=