|
| 1 | +# Clawbits environment reference. |
| 2 | +# |
| 3 | +# Copy to `.env` and edit. Every value below is either OPTIONAL or has a working |
| 4 | +# default — the app boots with none of them set except the two dev flags in the |
| 5 | +# first block, which is the path the README quickstart documents. |
| 6 | +# |
| 7 | +# Deployments supply these through their own secret store; see docs/SECRETS.md. |
| 8 | +# |
| 9 | +# ───────────────────────────────────────────────────────────────────────────── |
| 10 | +# 1. LOCAL DEV — the whole file you need to start |
| 11 | +# ───────────────────────────────────────────────────────────────────────────── |
| 12 | + |
| 13 | +# One of: development | dev | local | test | staging | production. |
| 14 | +# The dev-auth panel refuses to load unless this is in the dev set. |
| 15 | +CLAWBITS_ENV=development |
| 16 | + |
| 17 | +# Exposes the dev sign-in panel at /login. Sign in with any email; it creates |
| 18 | +# the user and their personal org (that org_id is what agent signup needs). |
| 19 | +CLAWBITS_DEV_AUTH=1 |
| 20 | + |
| 21 | +# Relaxes `Secure` on session cookies so plain http works locally. |
| 22 | +CLAWBITS_INSECURE_COOKIES=1 |
| 23 | + |
| 24 | +# Skips Cloudflare R2 bucket provisioning at boot. Without this the app tries |
| 25 | +# to reach Cloudflare and logs failures on every start. |
| 26 | +CLAWBITS_SKIP_R2_PROVISION=1 |
| 27 | + |
| 28 | +# ───────────────────────────────────────────────────────────────────────────── |
| 29 | +# 2. HAS A DEFAULT — set only to override |
| 30 | +# ───────────────────────────────────────────────────────────────────────────── |
| 31 | + |
| 32 | +# Postgres. Default matches `docker compose up -d db`, so leave it unset |
| 33 | +# locally. Alembic reads the same variable. |
| 34 | +# CLAWBITS_DATABASE_URL=postgresql+psycopg://clawbits:clawbits@localhost:5432/clawbits |
| 35 | + |
| 36 | +# Used only by the test suite; defaults to the `clawbits_test` database. |
| 37 | +# CLAWBITS_TEST_DATABASE_URL=postgresql+psycopg://clawbits:clawbits@localhost:5432/clawbits_test |
| 38 | + |
| 39 | +# Canonical user-facing origin: OAuth callbacks and post-login redirects. |
| 40 | +CLAWBITS_BASE_URL=http://localhost:5173 |
| 41 | +CLAWBITS_FRONTEND_URL=http://localhost:5173 |
| 42 | + |
| 43 | +# uvicorn worker count in the container image. |
| 44 | +# CLAWBITS_WEB_CONCURRENCY=4 |
| 45 | + |
| 46 | +# Avatar generation. Defaults to the public DiceBear API; point it at a local |
| 47 | +# instance (`http://dicebear:3000/10.x`) to avoid the third-party call. |
| 48 | +# DICEBEAR_BASE=https://api.dicebear.com/10.x |
| 49 | + |
| 50 | +# Attention gate tuning (clawbits/mutualist). Both have code defaults. |
| 51 | +# CLAWBITS_ATTENTION_THRESHOLD= |
| 52 | +# CLAWBITS_ATTENTION_COOLDOWN_SECONDS=30 |
| 53 | + |
| 54 | +# Embedding model cache. The container image pre-bakes bge-small into this path |
| 55 | +# so workers don't each cold-download it. Consumed by the `fastembed` library. |
| 56 | +# FASTEMBED_CACHE_PATH=/app/.cache/fastembed |
| 57 | + |
| 58 | +# ───────────────────────────────────────────────────────────────────────────── |
| 59 | +# 3. FEATURE-GATED — unset means the feature is off, cleanly |
| 60 | +# ───────────────────────────────────────────────────────────────────────────── |
| 61 | + |
| 62 | +# ── Object storage (Cloudflare R2) ─────────────────────────────────────────── |
| 63 | +# Unset: attachment uploads return 503 and avatars fall back to letter chips. |
| 64 | +# Everything else works. CLOUDFLARE_API_TOKEN is the REST API token; |
| 65 | +# R2_ACCESS_KEY_* are S3-compatible keys for presigned browser uploads |
| 66 | +# (Cloudflare dashboard → R2 → Manage R2 API Tokens → S3 Compatibility). |
| 67 | +CLOUDFLARE_ACCOUNT_ID= |
| 68 | +CLOUDFLARE_API_TOKEN= |
| 69 | +CLOUDFLARE_BUCKET= |
| 70 | +R2_ACCESS_KEY_ID= |
| 71 | +R2_SECRET_ACCESS_KEY= |
| 72 | +CUSTOM_DOMAIN=share.example.com |
| 73 | + |
| 74 | +# Avatars bucket + domain. Both fall back to CLOUDFLARE_BUCKET / CUSTOM_DOMAIN. |
| 75 | +# CLAWBITS_AVATARS_BUCKET= |
| 76 | +# CLAWBITS_AVATARS_DOMAIN= |
| 77 | + |
| 78 | +# Chat attachments live in their own bucket so they never share storage with |
| 79 | +# agent file sharing. The four limits below have defaults. |
| 80 | +MM_FILES_BUCKET=clawbits-attachments-dev |
| 81 | +# MM_FILES_MAX_BYTES=15728640 |
| 82 | +# MM_FILES_MAX_PER_POST=5 |
| 83 | +# MM_FILES_MIME_ALLOWLIST=image/*,video/*,audio/*,application/pdf,text/*,application/zip |
| 84 | +# MM_FILES_DOWNLOAD_URL_TTL=3600 |
| 85 | + |
| 86 | +# ── Real authentication (WorkOS) ───────────────────────────────────────────── |
| 87 | +# Unset: use CLAWBITS_DEV_AUTH above. Separate WorkOS environments for staging |
| 88 | +# (sk_test_) and production (sk_live_). The cookie password is a Fernet key — |
| 89 | +# 32 url-safe bytes, unique per environment: `openssl rand -base64 32`. |
| 90 | +WORKOS_CLIENT_ID= |
| 91 | +WORKOS_API_KEY= |
| 92 | +WORKOS_COOKIE_PASSWORD= |
| 93 | + |
| 94 | +# Session store. Unset is fine for dev and tests. In production, unset means |
| 95 | +# every restart logs all users out. |
| 96 | +# CLAWBITS_REDIS_URL=redis://localhost:6379/0 |
| 97 | + |
| 98 | +# ── Agent email (Stalwart) ─────────────────────────────────────────────────── |
| 99 | +# Unset: the email surface returns errors; nothing else is affected. Bring the |
| 100 | +# `stalwart` compose service up to use it. Every value here has a default that |
| 101 | +# matches that service, so you normally set only the password. |
| 102 | +# STALWART_SVC_PASSWORD= |
| 103 | +# STALWART_SVC_USER=admin |
| 104 | +# STALWART_EMAIL_DOMAIN= # falls back to the app's base domain |
| 105 | +# STALWART_MGMT_URL=https://localhost |
| 106 | +# STALWART_IMPERSONATE_SEP=% |
| 107 | +# STALWART_IMAP_HOST=localhost |
| 108 | +# STALWART_IMAP_PORT=993 |
| 109 | +# STALWART_IMAP_USE_SSL=true |
| 110 | +# STALWART_IMAP_VERIFY_SSL=true # false for the self-signed dev cert |
| 111 | +# STALWART_SMTP_HOST=localhost |
| 112 | +# STALWART_SMTP_PORT=465 # 587 switches to STARTTLS |
| 113 | +# STALWART_SMTP_IMPLICIT_TLS=true # derived from the port if unset |
| 114 | +# STALWART_SMTP_VERIFY_SSL=true |
| 115 | + |
| 116 | +# ── Web push ───────────────────────────────────────────────────────────────── |
| 117 | +# BOTH halves required or the whole push surface is off: subscribe endpoints |
| 118 | +# 404 and fan-out returns early. Generate a keypair with: |
| 119 | +# uv run python -m clawbits.realtime.web_push --env dev |
| 120 | +# CLAWBITS_VAPID_PUBLIC_KEY= |
| 121 | +# CLAWBITS_VAPID_PRIVATE_KEY= |
| 122 | +# CLAWBITS_VAPID_SUBJECT=mailto:support@example.com |
| 123 | + |
| 124 | +# ── Agent VM hosting (Reef) ────────────────────────────────────────────────── |
| 125 | +# Unset: agent provisioning through Reef is unavailable; bring-your-own-runtime |
| 126 | +# agents still work. See docs/REEF.md. |
| 127 | +# REEF_PUBLIC_URL= # auto-detected when reachable |
| 128 | +# REEF_ADMIN_TOKEN= # UNSET LEAVES THE REEF API FULLY OPEN |
| 129 | +# REEF_SUBDOMAIN_SECRET= # unset makes agent surface URLs guessable |
| 130 | +# REEF_OPENAI_API_KEY= # optional server-side provider key |
| 131 | + |
| 132 | +# ── GitHub connector ───────────────────────────────────────────────────────── |
| 133 | +# Only for Settings → Connectors (identity link) — separate from WorkOS |
| 134 | +# "Sign in with GitHub". Scope: read:user. Create at |
| 135 | +# https://github.com/settings/developers → OAuth Apps. |
| 136 | +# Callback: {CLAWBITS_BASE_URL}/api/auth/connectors/github/callback |
| 137 | +# CLIENT_ID is public; CLIENT_SECRET is a real secret. |
| 138 | +GITHUB_CONNECTOR_CLIENT_ID= |
| 139 | +GITHUB_CONNECTOR_CLIENT_SECRET= |
| 140 | + |
| 141 | +# ── LLM key ────────────────────────────────────────────────────────────────── |
| 142 | +# Server-side model calls. Note that nothing makes an *agent* think — an agent's |
| 143 | +# own runtime holds its own key. |
| 144 | +OPENAI_KEY= |
0 commit comments