Skip to content
Workbench
Esc
↑↓navigate↵open⌘Jpreview
On this page

Credentials and profiles

Separate shared development secrets, individual credentials, and local settings.

Developer access

For daily reporting credentials, see the daily Slack digest. For optional AI generation telemetry, see Raindrop setup.

For the optional server-side decision provider, see Jev setup.

An administrator grants shared Cloudflare and Alchemy-state access, plus PlanetScale membership.

For Cloudflare, grant Workers Admin, Hyperdrive Admin, metadata read access, and Secrets Store Deployer on the shared account. The existing Alchemy state secret must include the workers scope. Deployer permits binding it to a Worker; reserve Secrets Store Admin for managing secrets. See Cloudflare’s access controls. Full account administration is unnecessary.

For PlanetScale, create a separate, revocable service token for each developer, scoped to workbench: database read access, development-branch create/read/delete, and development-role management. Keep production writes/deletion and organization administration excluded. Share token ID and secret privately; CI uses a separate token.

Follow Alchemy’s service-token setup. Developers need no organization-admin role. Database permissions apply across the permitted development branches, not just one person’s branch.

Alchemy profiles

After an administrator grants provider, database, and state access, connect the intended profile:

bun run workbench auth cloudflare --profile team
bun run workbench auth planetscale --profile team
bun run workbench doctor --stage dev-yourname --profile team

Alchemy stores credentials in the selected local profile. cf and pscale use separate sessions; signing in there does not connect Alchemy. Use cf for direct Cloudflare operations.

auth adds a missing provider or reconfigures an existing connection. Select Cloudflare account 3319e72549b86d6f527fd17cfaa204e6 (Sriket@wurthy.co’s Account) and PlanetScale organization workbench. Your personal login remains yours; the selected provider account must be shared.

Doctor with --stage, guided setup, linking, and provisioning validate those identities and require the shared workbench/prod/Postgres state record. Wrong accounts stop before planning or changing resources. Environment credentials override profiles and must target the same shared accounts. A read-only plan then verifies provisioning permissions.

Credentials from the environment

Complete process-environment credentials take precedence over profiles. An incomplete set falls back to the selected profile; providers can use different sources.

Provider Required variables
Cloudflare token CLOUDFLARE_ACCOUNT_ID, CLOUDFLARE_API_TOKEN
Cloudflare API key CLOUDFLARE_ACCOUNT_ID, CLOUDFLARE_API_KEY, and CLOUDFLARE_EMAIL or CLOUDFLARE_ACCOUNT_EMAIL
PlanetScale PLANETSCALE_API_TOKEN_ID, PLANETSCALE_API_TOKEN, PLANETSCALE_ORGANIZATION

Development configuration ownership

Configuration Owner and location
Shared non-secret defaults Effect defaults in packages/config/src/env.ts, such as PLANETSCALE_DATABASE
Shared development secrets Development vault; commit only references in .env.development
Individual provider credentials Each developer’s Alchemy profile or explicitly supplied process credentials
Personal stage, profile, API URL, and ports Ignored local settings; onboarding preserves unrelated values
Runtime database credentials Infrastructure supplies Hyperdrive; do not sync these to developers
Production and CI credentials Deployment configuration, separate from development vault access

No shared application API credential is currently configured in .env.development. Alchemy manages authentication signing material per stage, and Hyperdrive supplies runtime database credentials. Add a shared secret when a feature needs it; keep the individually revocable provider credentials described above.

Shared development secrets with Proton Pass

Accept the team-owned Workbench Development vault invitation using your individual Proton membership. Confirm its owner and members in Proton before adding credentials; an identically named personal or test vault is not the team vault. Install the Proton Pass CLI and sign in using the commands in the CLI reference. The Effect configuration provider calls the Proton CLI using your existing session; onboarding does not store your Proton password or token.

For a feature needing a shared sandbox credential, define its type and sensitivity in packages/config/src/env.ts, then add its actual development-vault reference to the tracked .env.development file:

# Example only; replace with the feature's real key and vault reference.
SANDBOX_API_KEY="pass://Workbench Development/Sandbox API/password"

Commit the reference, never the resolved value. Use an application development vault, separate from client logins and production. References identify vault items, so use names suitable for this repository’s readers.

Keep vault and item names unique when using name-based references. Proton resolves duplicate names to one match rather than rejecting ambiguity. Rename personal test copies before using the team vault; explicit Share ID and Item ID references can also disambiguate, but verify them with each developer’s membership before committing them. See Proton’s reference syntax.

The Effect configuration provider resolves configured references automatically for development commands, including bun run dev and bun run dev:web. Guided onboarding checks resolution before service setup; rerun the explicit secrets check after changing access or references. Failed resolution stops the check or development launch. There is no silent fallback to stale secret values.

Each new launch fetches current values; restart running processes after a vault change. This is retrieval, not two-way synchronization: local edits never update the vault. Resolved values enter the child process environment and are not written to environment files. Trusted development code can read those values.

For a private override, put a plain pass:// reference in ignored .env.development.local. Keep stage/profile/API settings in .env.local, as written by onboarding. Precedence, from lowest to highest, is Effect defaults, .env, .env.local, .env.<environment>, .env.<environment>.local, then process variables. An explicit override remains in effect until removed. Existing personal protonPass(...) references are accepted during migration; new references use plain URIs.

Only development loads .env.development and .env.development.local. Preview, production, and test select their own environment files; CI verification explicitly selects test so builds do not need developer vault access. .env.local is loaded across environments, so keep development-only secret references in development-specific files. New worktrees receive committed references through Git while personal overrides remain separate.

packages/config/src/env.ts owns types, defaults, URL validation, and secret sensitivity through native Effect Config. packages/config/src/environment.ts parses dotenv files with Effect, resolves configured Proton fields, and supplies Alchemy’s secrets configuration provider. It does not implement another configuration expression language. Provider failures stop startup and withhold raw diagnostics. The command runner masks resolved secrets in stdout/stderr, including split output chunks, and excludes all PROTON_PASS_* resolver credentials from child environments. These are output protections; trusted child code still receives its application secrets.

See Effect ConfigProvider and Proton secret references. Live vault access is a separate acceptance check; repository tests replace only the external Proton CLI with dummy credentials.

Google sign-in

Create a Google OAuth Web application client and configure its consent screen for identity access. Google’s redirect URI rules require exact registrations and do not permit wildcards, so Workbench registers one callback per Google client: the stable origin followed by /api/auth/callback/google. Every other origin signs in through Better Auth’s OAuth proxy; see the stable callback.

Google sign-in remains disabled until both GOOGLE_AUTH_CLIENT_ID and GOOGLE_AUTH_CLIENT_SECRET are configured. The proxy is enabled when both OAUTH_PROXY_URL, the stable frontend origin, and OAUTH_PROXY_SECRET, a random value shared by every stage that uses that client, are configured; a stage with only one of them logs a warning and stays unproxied. The stable host itself also needs OAUTH_PROXY_ORIGINS, a comma-separated list of origin patterns it may forward sign-ins to, and refuses to start without it. For previews and production, add the fields to the corresponding Proton environment item; the environment files already reference them. For local development, put the same four values in ignored .env.development.local or in the shared development vault. Use a separate non-production client for previews and development, and a production client with its own secret for production. Alchemy binds the secrets as Worker secrets; keep them out of frontend configuration and logs. Deploying configuration follows the existing deployment approval rules.

A Google client in testing mode also requires approved test users. For callback mismatches, check the registered URI and client settings before retrying.

Optional 1Password injection

Install 1Password CLI, configure desktop integration or a scoped service account, and obtain development-vault access.

cp onboarding/1password.env.example .env.1password.local
# Replace the placeholder vault, item, and field references.
bun run workbench plan --stage dev-yourname --secrets-file .env.1password.local

--secrets-file uses op run --env-file … -- …. Resolved secrets stay in the subprocess environment and are not copied into .env.local. Pass the flag on each command needing injection, including workbench dev.

Keep production and runtime database passwords out of the reference file. Alchemy supplies runtime credentials directly to Hyperdrive.

See 1Password’s injection workflow. Live vault verification is separate from repository tests.

Deployment configuration

Application deployment settings live in Proton Pass. The committed .env.preview and .env.production files contain exact references; packages/config/src/env.ts supplies types, validation, and sensitivity. Add future configuration fields there and to the corresponding Proton environment item. Resource identifiers, compatibility settings, and derived PR origins stay in infrastructure code.

Each environment has a dedicated vault: Workbench Preview Deployment or Workbench Production Deployment, with configuration stored as fields on its Environment item. These include application keys, Cloudflare/PlanetScale deployment credentials, and production Linear/Slack reporting credentials. References use unique vault/item names, so replacing an automation identity does not change application references.

Each GitHub environment retains only its PROTON_PASS_PERSONAL_ACCESS_TOKEN after cutover. Permanent readers have viewer access to their own environment vault; they cannot access the other environment. Reader credentials expire after one year. Recovery copies remain in the administrator’s Workbench Production vault as Workbench preview deployment reader and Workbench production deployment reader; automation cannot read those bootstrap items. Temporary migration writers are scoped to their destination vault and are revoked after transfer verification. Old item-level grants are retired after the corresponding vault-backed workflows pass.

The workflows install a pinned, checksum-verified Proton CLI, then run the Effect environment command to retrieve, validate, mask, and export configuration for the job. Reader sessions live in the disposable runner’s temporary directory and are not cached or uploaded. Proton resolver credentials are excluded from application subprocesses and configuration exports. Verification jobs use APP_ENV=test and receive no reader token or live key.

Cloudflare/PlanetScale administration credentials and Linear/Slack reporting credentials have been copied into their dedicated environment vaults and verified by readback. Temporary migration writers and their GitHub tokens are revoked, and obsolete item grants are retired. The one-time transfer workflow and scripts are removed; normal automation has read-only Proton access. Production retains its main-only environment policy. Keep GitHub’s original copies until the corresponding workflows have been verified and the default branch no longer needs them.

Alchemy consumes the resolved configuration and declares Worker bindings. Deployed Workers do not log into Proton; administration and reporting credentials remain deployment-runner configuration rather than frontend or Worker bindings.

After rotating an application value, edit Proton and redeploy; no GitHub application-key copy needs updating. Renew the reader credential before expiry and update only its GitHub bootstrap secret using the CLI reference. Both environment transfers are verified; retire the legacy GitHub copies after default-branch cutover. Its hosted application deployment still follows the normal merge/release workflow.

Linear and production releases

Complete this setup before merging the production reporting workflow:

  1. Enable Linear’s GitHub integration for CreditWurthy/workbench. Engineers should connect their own GitHub accounts for attribution. GitHub Issues synchronization is optional.
  2. In Workbench’s issue statuses, create Merged in the Started category; retain Done in Completed.
  3. In Workbench’s PR automations, set the default merge action to No action. Add a target-branch regex ^main$ with merge destination Merged. These are team settings, so review their effect on other repositories using Workbench tickets. Keep review/open mappings as appropriate for the team.
  4. Create a continuous release pipeline named Workbench production, associated with Workbench. Releases require Linear Business or Enterprise. Use a dedicated pipeline for this repository; leave path filters unset so all deployed Workbench changes are included.
  5. Generate the pipeline access key and store it as LINEAR_ACCESS_KEY in the Workbench Production Deployment vault’s Environment item, referenced by .env.production. A personal Linear API key cannot substitute for this key. Keep it out of local app configuration, PR workflows, and logs.
  6. Before enabling completion automation, verify the latest successful production deployment’s SHA and record the intended release baseline. Review which historical commits the first scan would include so old tickets are not completed unintentionally.
  7. Configure release-completion automation for that pipeline to move eligible issues to Done. Keep other pipelines out of this rule. Issues with only contributing PRs, or remaining open contributing/closing PRs, are not completed by this automation.
  8. Apply the intended repository settings after reviewing current settings: squash messages must retain PR title/body, and Linear Issue must be required alongside the existing checks. See repository settings. Land the new check before requiring it on existing PRs.

The release action runs only after successful Alchemy reconciliation on main, for pushes and explicitly authorized manual deploys. It skips manual plans. Missing or invalid release credentials fail reporting; a completed deployment remains deployed.

The Linear GitHub guide, release setup, and official release action describe the integration settings and credential types. Follow the stack guide for engineer-facing status semantics.

Production announcements in Slack

Add SLACK_SHIPPED_IT_WEBHOOK_URL to Proton’s Workbench Production Deployment → Environment item, using a Slack incoming webhook bound to #shipped-it. Create it through the Slack app dashboard: select the app, enable Incoming Webhooks, then add a webhook to that channel. The webhook URL is a credential; enter it directly into the hidden Proton field. The channel’s members will be able to read the Workbench PR titles and ticket links in announcements.

After production deployment and Linear release reporting succeed, the separate Announce production release job posts one summary with PR links, WB ticket links, the Linear release, and deployment details. Plans, previews, and failed deployment/reporting jobs do not announce a release.

The summary includes commits since the previous successful Production workflow that recorded a Linear release, skipping successful manual plans. This includes changes from intervening failed runs. Retrying an older announcement excludes newer production runs from its baseline. Up to 20 changes and 20 ticket links appear, with the full comparison linked for larger releases. The first announcement requires an existing successful production release as its baseline.

A Slack failure fails the announcement job while leaving the completed deployment and Linear release intact. Fix the credential or delivery issue and retry only that failed job; redeployment is unnecessary. Check the channel before retrying an ambiguous delivery failure: Slack webhooks cannot guarantee exactly-once delivery. Rerunning an already successful announcement can post a duplicate. Use the announcement dry run to inspect a payload without sending it.

Was this page helpful?