From 506382f39e13c887ea7bc882cebdca2f68c4d9e7 Mon Sep 17 00:00:00 2001 From: Theo Browne Date: Thu, 6 Aug 2026 23:37:46 -0700 Subject: [PATCH] docs: ship production T3 Connect public config in .env.example The Clerk publishable key, JWT template, CLI OAuth client ID, and relay URL are public identifiers already baked into every release artifact. Filling in the real values makes 'cp .env.example .env' the entire setup step for cloud-enabled source builds, while a fresh clone still defaults to cloud-off. Co-Authored-By: Claude Fable 5 --- .env.example | 21 ++++++++++++--------- docs/internals/t3-connect.md | 12 ++++++++++-- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/.env.example b/.env.example index 61cdd66d246..fc67dcef947 100644 --- a/.env.example +++ b/.env.example @@ -1,12 +1,14 @@ # Optional: T3 Connect source builds -# Leave these unset to disable optional T3 Connect features in local source builds. -# Release builds inject their public values at build time. Do not add server-side -# secrets to this file. +# `cp .env.example .env` enables T3 Connect against the production deployment. +# These are the same public identifiers baked into official release builds, not +# secrets. Remove or comment them out to build with cloud features disabled. +# Do not add server-side secrets to this file. -# Get these from the Clerk Dashboard under API keys, JWT templates, and OAuth applications. -# T3CODE_CLERK_PUBLISHABLE_KEY=pk_test_... -# T3CODE_CLERK_JWT_TEMPLATE=t3-relay -# T3CODE_CLERK_CLI_OAUTH_CLIENT_ID=oauthapp_... +# Production Clerk instance. To use your own, get these from the Clerk Dashboard +# under API keys, JWT templates, and OAuth applications. +T3CODE_CLERK_PUBLISHABLE_KEY=pk_live_Y2xlcmsudDMuY29kZXMk +T3CODE_CLERK_JWT_TEMPLATE=t3-relay +T3CODE_CLERK_CLI_OAUTH_CLIENT_ID=hzxSgY2cH10sDU2r # Optional: signed macOS passkey builds. The RP domain defaults to the Frontend API # hostname encoded in T3CODE_CLERK_PUBLISHABLE_KEY. Set the override only when Clerk @@ -15,8 +17,9 @@ # T3CODE_MACOS_PROVISIONING_PROFILE=/absolute/path/to/t3code.provisionprofile # T3CODE_CLERK_PASSKEY_RP_DOMAINS=example.clerk.accounts.dev,clerk.example.com -# Get this from your relay deployment. `infra/relay` deploys update it automatically. -# T3CODE_RELAY_URL=https://relay.example.com +# Production relay. For a self-hosted relay, `infra/relay` deploys update it +# automatically. +T3CODE_RELAY_URL=https://relay.t3.codes # Optional: hosted app origin used by the CLI's out-of-band OAuth flow. # Defaults to https://app.t3.codes; override to test against a staging deployment. diff --git a/docs/internals/t3-connect.md b/docs/internals/t3-connect.md index c8a0217919f..c734f0f9dd7 100644 --- a/docs/internals/t3-connect.md +++ b/docs/internals/t3-connect.md @@ -14,8 +14,16 @@ For the wider system diagram, see ## Application Keys -T3 Connect is disabled in a fresh clone. To enable it for source builds, add a repository-root `.env` -or `.env.local` file: +T3 Connect is disabled in a fresh clone. To enable it for source builds against the production +deployment, copy the repository-root example file: + +```sh +cp .env.example .env +``` + +`.env.example` carries the production public identifiers (the same values baked into official +release builds). To target a different Clerk application or relay, set the values yourself in a +repository-root `.env` or `.env.local` file: ```dotenv T3CODE_CLERK_PUBLISHABLE_KEY=