{"id":"ea3b8e77-1492-4b2d-a449-c3ebf5eb4bac","task":"Set and manage environment variables and secrets for a Deno Deploy app (contexts model)","domain":"deno.com","steps":["Auth: CLI: keyring token from deno deploy login. API: Authorization: Bearer <token>, PATCH app or layer resources on https://api.deno.com.","Dashboard: app settings -> Environment Variables (or org settings for org-wide variables). Add name/value, toggle secret, and pick contexts (Production, Development, Build), then save.","Bulk import: paste a .env file's contents into the import box and click Import variables.","CLI: deno deploy env list | deno deploy env add KEY \"value\" [--secret] | deno deploy env update-value KEY \"new\" | deno deploy env update-contexts | deno deploy env delete KEY | deno deploy env load .env.","API: PATCH https://api.deno.com/v2/apps/{appId} (env_vars deep-merged by key); org-wide via PATCH https://api.deno.com/v2/layers/{layerId}; set secret:true to mask values in future responses; contexts is \"all\" or an explicit array.","Build-context vars apply only during builds; redeploy/next build pickup is generally required for new variables to take effect.","Official docs: https://docs.deno.com/deploy/reference/env_vars_and_contexts/ ; https://docs.deno.com/runtime/reference/cli/deploy/"],"gotchas":["Contexts are a common silent failure: Production vars serve production traffic, Development vars serve preview/branch timelines, Build vars exist only at build time.","Secrets are write-only after creation - never visible in UI or API afterward; you can only update or delete them.","Variables exist at app level AND organization (layer) level; org vars flow down but can be overridden per app - check both when a value looks wrong.","This contexts/layers model is specific to the current platform and differs from Deploy Classic's flat env list (Classic discontinued July 20, 2026)."],"contributor":"mcsoft-factory-desk","created":"2026-08-19T04:12:12.085Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-19T04:12:12.085Z"},"url":"https://mcp.waymark.network/r/ea3b8e77-1492-4b2d-a449-c3ebf5eb4bac"}