Skip to content
This repository was archived by the owner on Oct 1, 2026. It is now read-only.

Latest commit

 

History

History
104 lines (77 loc) · 6.55 KB

environment.md

File metadata and controls

104 lines (77 loc) · 6.55 KB

Environment Variables

This is the single source of truth for environment configuration across the repo.

App Local Env (app/.env.local)

From repo root:

cp app/.env.example app/.env.local

Frontend (Vite) variables:

  • VITE_CONVEX_URL (required)
  • VITE_DEV_AUTH (optional, defaults to false)
  • VITE_CLERK_PUBLISHABLE_KEY (required when VITE_DEV_AUTH=false)
  • VITE_PAYWALL_DISABLED (optional, defaults to false)

Ingestion local env

Ingestion-related tooling lives under ingestion/ at the repo root. The satellite pipeline uses:

ingestion/satellite/.env.local

From repo root:

cp ingestion/satellite/.env.example ingestion/satellite/.env.local

Minimum required for Convex writeback:

  • CONVEX_DEPLOYMENT_URL
  • CONVEX_API_KEY

Provider/storage variables are optional and depend on enabled integrations.

Convex Dashboard Env Vars (Server-side only)

Set these in Convex Dashboard for backend actions:

  1. Open Convex Dashboard
  2. Select your deployment
  3. Go to Deployment Settings -> Environment Variables
  4. Add/update keys below

Required:

  • AI_GATEWAY_API_KEY

Optional:

  • BRAINTRUST_API_KEY
  • BRAINTRUST_PROJECT_NAME
  • GITHUB_TOKEN
  • CONVEX_DEBUG

These are server-side only. Do not prefix them with VITE_.

Variable Matrix

Variable Scope Required Default Where Used Acquisition
VITE_CONVEX_URL Vite Yes none app/src/main.tsx Convex deployment URL from Deployment Settings
VITE_DEV_AUTH Vite No false app/src/lib/auth/index.tsx Local toggle, no external provider needed
VITE_CLERK_PUBLISHABLE_KEY Vite Conditional (VITE_DEV_AUTH=false) none app/src/lib/auth/index.tsx Clerk dashboard publishable key per Clerk env docs
VITE_PAYWALL_DISABLED Vite No false app/src/routes/app.tsx Local toggle, no external provider needed
AI_GATEWAY_API_KEY Convex Yes (AI path) none app/convex/harness/agent/grazingAgentDirect.ts Vercel AI Gateway key from Vercel Dashboard -> Project Settings -> AI Gateway
BRAINTRUST_API_KEY Convex No none app/lib/braintrust.ts Braintrust org API key per Braintrust API intro
BRAINTRUST_PROJECT_NAME Convex No grazing-agent app/lib/braintrust.ts Optional name from Braintrust projects
GITHUB_TOKEN Convex No none app/convex/bugReportsAction.ts and app/convex/featureRequestsAction.ts GitHub PAT per token docs
CONVEX_DEBUG Convex No false app/convex/lib/logger.ts Local/Convex toggle, no provider key
CONVEX_DEPLOYMENT_URL Ingestion (satellite) Yes (writeback path) none ingestion/satellite/writer.py Convex deployment URL from Deployment Settings
CONVEX_API_KEY Ingestion (satellite) Yes (writeback path) none ingestion/satellite/writer.py and ingestion/satellite/scheduler.py Convex deploy key per deploy key docs
COPERNICUS_CLIENT_ID Ingestion (satellite) No none ingestion/satellite/providers/copernicus.py CDSE OAuth client per CDSE auth docs
COPERNICUS_CLIENT_SECRET Ingestion (satellite) No none ingestion/satellite/providers/copernicus.py CDSE OAuth secret from same client setup
PL_API_KEY Ingestion (satellite) No none ingestion/satellite/providers/planet_scope.py Planet API key per Planet auth docs
PL_CLIENT_ID Ingestion (satellite) No none ingestion/satellite/providers/planet_scope.py Planet OAuth client credentials (optional) per Planet auth docs
PL_CLIENT_SECRET Ingestion (satellite) No none ingestion/satellite/providers/planet_scope.py Planet OAuth client credentials (optional) per Planet auth docs
R2_ACCOUNT_ID Ingestion (satellite) No none ingestion/satellite/storage/r2.py Cloudflare account ID per R2 S3 token docs
R2_ACCESS_KEY_ID Ingestion (satellite) No none ingestion/satellite/storage/r2.py Cloudflare R2 S3 access key per R2 get started
R2_SECRET_ACCESS_KEY Ingestion (satellite) No none ingestion/satellite/storage/r2.py Cloudflare R2 S3 secret key per R2 get started
R2_BUCKET_NAME Ingestion (satellite) No grazing-satellite-tiles ingestion/satellite/storage/r2.py Existing/new R2 bucket name
R2_PUBLIC_URL_BASE Ingestion (satellite) No none ingestion/satellite/storage/r2.py Optional public/custom domain URL
COMPOSITE_WINDOW_DAYS Ingestion (satellite) No 21 ingestion/satellite/config.py Local tuning value
MAX_CLOUD_COVER Ingestion (satellite) No 50 ingestion/satellite/config.py Local tuning value
MIN_CLOUD_FREE_PCT Ingestion (satellite) No 0.3 ingestion/satellite/config.py Local tuning value
DEFAULT_PROVIDER Ingestion (satellite) No sentinel2 ingestion/satellite/config.py Local tuning value (copernicus or sentinel2)
ENABLE_PLANET_SCOPE Ingestion (satellite) No false ingestion/satellite/config.py Local toggle for PlanetScope integration
WRITE_TO_CONVEX Ingestion (satellite) No true ingestion/satellite/config.py Local toggle for writeback
OUTPUT_DIR Ingestion (satellite) No output ingestion/satellite/config.py Local filesystem path
LOG_LEVEL Ingestion (satellite) No INFO ingestion/satellite/config.py Local logging config

Convex CLI Parity

Reference: Convex env docs.

npx convex env list
npx convex env get AI_GATEWAY_API_KEY
npx convex env set AI_GATEWAY_API_KEY "your_value"
npx convex env remove CONVEX_DEBUG