[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-encore-encore-secret":3,"mdc-3ir9hl-key":40,"related-repo-encore-encore-secret":1111,"related-org-encore-encore-secret":1213},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":12,"stars":27,"repoUrl":28,"updatedAt":29,"license":30,"forks":31,"topics":32,"repo":35,"sourceUrl":38,"mdContent":39},"encore-secret","manage secrets in Encore.ts applications","Manage API keys, credentials, and other secrets in Encore.ts using `secret(...)` from `encore.dev\u002Fconfig`.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},"encore","Encore","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fencore.png","encoredev",[13,17,20,23,26],{"name":14,"slug":15,"type":16},"Security","security","tag",{"name":18,"slug":19,"type":16},"Configuration","configuration",{"name":21,"slug":22,"type":16},"Backend","backend",{"name":24,"slug":25,"type":16},"TypeScript","typescript",{"name":9,"slug":8,"type":16},26,"https:\u002F\u002Fgithub.com\u002Fencoredev\u002Fskills","2026-05-16T05:59:58.10741",null,5,[33,34],"claude-code","skills",{"repoUrl":28,"stars":27,"forks":31,"topics":36,"description":37},[33,34],"Agent Skills for development with Encore.","https:\u002F\u002Fgithub.com\u002Fencoredev\u002Fskills\u002Ftree\u002FHEAD\u002Fencore\u002Fsecret","---\nname: encore-secret\ndescription: Manage API keys, credentials, and other secrets in Encore.ts using `secret(...)` from `encore.dev\u002Fconfig`.\nwhen_to_use: >-\n  User wants to load a private credential into the service without committing it to the repo — third-party API keys (Stripe, OpenAI, Twilio, SendGrid), database passwords, signing keys, OAuth client secrets, JWT signing keys, webhook signing secrets. Covers `secret()` declarations, calling the secret as a function to read its value, setting values via `encore secret set`, and `.secrets.local.cue` for local overrides. Trigger phrases: \"API key\", \"third-party token\", \"credentials\", \"without committing\", \"private key\", \"signing secret\", \"secret manager\", \".env replacement\", \"encore secret set\".\n---\n\n# Encore Secrets\n\n## Instructions\n\nSecrets are encrypted, environment-scoped values managed by Encore. Declare them at package level by calling `secret(name)` and read them by calling the returned function.\n\n```typescript\nimport { secret } from \"encore.dev\u002Fconfig\";\n\n\u002F\u002F Package-level declaration\nconst stripeKey = secret(\"StripeSecretKey\");\n\n\u002F\u002F Read inside a handler\nasync function chargeCustomer() {\n  const key = stripeKey();        \u002F\u002F \u003C-- function call returns the value\n  const stripe = new Stripe(key);\n  \u002F\u002F ...\n}\n```\n\nSecret names are globally unique across the application (the same name resolves to the same value everywhere).\n\n## Setting values\n\n```bash\n# Set per environment type\nencore secret set --type prod StripeSecretKey\nencore secret set --type dev StripeSecretKey\nencore secret set --type local StripeSecretKey\n```\n\nEnvironment types: `production` (alias `prod`), `development` (alias `dev`), `preview` (alias `pr`), `local`.\n\n## Local overrides\n\nFor local development without going through `encore secret set`, create a `.secrets.local.cue` file at the repo root (gitignore it):\n\n```cue\nStripeSecretKey: \"sk_test_local_...\"\nGitHubAPIToken:  \"ghp_local_...\"\n```\n\n## Common usage patterns\n\n```typescript\n\u002F\u002F HTTP headers\nconst githubToken = secret(\"GitHubAPIToken\");\nconst resp = await fetch(\"https:\u002F\u002Fapi.github.com\u002Fuser\", {\n  headers: { Authorization: `token ${githubToken()}` },\n});\n\n\u002F\u002F Webhook signature verification\nconst stripeWebhookSecret = secret(\"StripeWebhookSecret\");\nstripe.webhooks.constructEvent(rawBody, sig, stripeWebhookSecret());\n\n\u002F\u002F Connecting to a third-party SDK\nconst openaiKey = secret(\"OpenAIKey\");\nconst openai = new OpenAI({ apiKey: openaiKey() });\n```\n\n## Guidelines\n\n- Always declare `secret(...)` at package level, never inside functions.\n- Read with a function call: `stripeKey()` not `stripeKey`.\n- Set distinct values per environment via `encore secret set --type \u003Cenv>`.\n- Never commit secret values; use `.secrets.local.cue` for local overrides and gitignore it.\n- For webhook signature secrets specifically, see also the `encore-webhook` skill.\n",{"data":41,"body":43},{"name":4,"description":6,"when_to_use":42},"User wants to load a private credential into the service without committing it to the repo — third-party API keys (Stripe, OpenAI, Twilio, SendGrid), database passwords, signing keys, OAuth client secrets, JWT signing keys, webhook signing secrets. Covers `secret()` declarations, calling the secret as a function to read its value, setting values via `encore secret set`, and `.secrets.local.cue` for local overrides. Trigger phrases: \"API key\", \"third-party token\", \"credentials\", \"without committing\", \"private key\", \"signing secret\", \"secret manager\", \".env replacement\", \"encore secret set\".",{"type":44,"children":45},"root",[46,55,62,77,360,365,371,476,533,539,560,585,591,1024,1030,1105],{"type":47,"tag":48,"props":49,"children":51},"element","h1",{"id":50},"encore-secrets",[52],{"type":53,"value":54},"text","Encore Secrets",{"type":47,"tag":56,"props":57,"children":59},"h2",{"id":58},"instructions",[60],{"type":53,"value":61},"Instructions",{"type":47,"tag":63,"props":64,"children":65},"p",{},[66,68,75],{"type":53,"value":67},"Secrets are encrypted, environment-scoped values managed by Encore. Declare them at package level by calling ",{"type":47,"tag":69,"props":70,"children":72},"code",{"className":71},[],[73],{"type":53,"value":74},"secret(name)",{"type":53,"value":76}," and read them by calling the returned function.",{"type":47,"tag":78,"props":79,"children":83},"pre",{"className":80,"code":81,"language":25,"meta":82,"style":82},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { secret } from \"encore.dev\u002Fconfig\";\n\n\u002F\u002F Package-level declaration\nconst stripeKey = secret(\"StripeSecretKey\");\n\n\u002F\u002F Read inside a handler\nasync function chargeCustomer() {\n  const key = stripeKey();        \u002F\u002F \u003C-- function call returns the value\n  const stripe = new Stripe(key);\n  \u002F\u002F ...\n}\n","",[84],{"type":47,"tag":69,"props":85,"children":86},{"__ignoreMap":82},[87,142,152,162,214,221,230,259,298,342,351],{"type":47,"tag":88,"props":89,"children":92},"span",{"class":90,"line":91},"line",1,[93,99,105,111,116,121,126,132,137],{"type":47,"tag":88,"props":94,"children":96},{"style":95},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[97],{"type":53,"value":98},"import",{"type":47,"tag":88,"props":100,"children":102},{"style":101},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[103],{"type":53,"value":104}," {",{"type":47,"tag":88,"props":106,"children":108},{"style":107},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[109],{"type":53,"value":110}," secret",{"type":47,"tag":88,"props":112,"children":113},{"style":101},[114],{"type":53,"value":115}," }",{"type":47,"tag":88,"props":117,"children":118},{"style":95},[119],{"type":53,"value":120}," from",{"type":47,"tag":88,"props":122,"children":123},{"style":101},[124],{"type":53,"value":125}," \"",{"type":47,"tag":88,"props":127,"children":129},{"style":128},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[130],{"type":53,"value":131},"encore.dev\u002Fconfig",{"type":47,"tag":88,"props":133,"children":134},{"style":101},[135],{"type":53,"value":136},"\"",{"type":47,"tag":88,"props":138,"children":139},{"style":101},[140],{"type":53,"value":141},";\n",{"type":47,"tag":88,"props":143,"children":145},{"class":90,"line":144},2,[146],{"type":47,"tag":88,"props":147,"children":149},{"emptyLinePlaceholder":148},true,[150],{"type":53,"value":151},"\n",{"type":47,"tag":88,"props":153,"children":155},{"class":90,"line":154},3,[156],{"type":47,"tag":88,"props":157,"children":159},{"style":158},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[160],{"type":53,"value":161},"\u002F\u002F Package-level declaration\n",{"type":47,"tag":88,"props":163,"children":165},{"class":90,"line":164},4,[166,172,177,182,187,192,196,201,205,210],{"type":47,"tag":88,"props":167,"children":169},{"style":168},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[170],{"type":53,"value":171},"const",{"type":47,"tag":88,"props":173,"children":174},{"style":107},[175],{"type":53,"value":176}," stripeKey ",{"type":47,"tag":88,"props":178,"children":179},{"style":101},[180],{"type":53,"value":181},"=",{"type":47,"tag":88,"props":183,"children":185},{"style":184},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[186],{"type":53,"value":110},{"type":47,"tag":88,"props":188,"children":189},{"style":107},[190],{"type":53,"value":191},"(",{"type":47,"tag":88,"props":193,"children":194},{"style":101},[195],{"type":53,"value":136},{"type":47,"tag":88,"props":197,"children":198},{"style":128},[199],{"type":53,"value":200},"StripeSecretKey",{"type":47,"tag":88,"props":202,"children":203},{"style":101},[204],{"type":53,"value":136},{"type":47,"tag":88,"props":206,"children":207},{"style":107},[208],{"type":53,"value":209},")",{"type":47,"tag":88,"props":211,"children":212},{"style":101},[213],{"type":53,"value":141},{"type":47,"tag":88,"props":215,"children":216},{"class":90,"line":31},[217],{"type":47,"tag":88,"props":218,"children":219},{"emptyLinePlaceholder":148},[220],{"type":53,"value":151},{"type":47,"tag":88,"props":222,"children":224},{"class":90,"line":223},6,[225],{"type":47,"tag":88,"props":226,"children":227},{"style":158},[228],{"type":53,"value":229},"\u002F\u002F Read inside a handler\n",{"type":47,"tag":88,"props":231,"children":233},{"class":90,"line":232},7,[234,239,244,249,254],{"type":47,"tag":88,"props":235,"children":236},{"style":168},[237],{"type":53,"value":238},"async",{"type":47,"tag":88,"props":240,"children":241},{"style":168},[242],{"type":53,"value":243}," function",{"type":47,"tag":88,"props":245,"children":246},{"style":184},[247],{"type":53,"value":248}," chargeCustomer",{"type":47,"tag":88,"props":250,"children":251},{"style":101},[252],{"type":53,"value":253},"()",{"type":47,"tag":88,"props":255,"children":256},{"style":101},[257],{"type":53,"value":258}," {\n",{"type":47,"tag":88,"props":260,"children":262},{"class":90,"line":261},8,[263,268,273,278,283,288,293],{"type":47,"tag":88,"props":264,"children":265},{"style":168},[266],{"type":53,"value":267},"  const",{"type":47,"tag":88,"props":269,"children":270},{"style":107},[271],{"type":53,"value":272}," key",{"type":47,"tag":88,"props":274,"children":275},{"style":101},[276],{"type":53,"value":277}," =",{"type":47,"tag":88,"props":279,"children":280},{"style":184},[281],{"type":53,"value":282}," stripeKey",{"type":47,"tag":88,"props":284,"children":286},{"style":285},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[287],{"type":53,"value":253},{"type":47,"tag":88,"props":289,"children":290},{"style":101},[291],{"type":53,"value":292},";",{"type":47,"tag":88,"props":294,"children":295},{"style":158},[296],{"type":53,"value":297},"        \u002F\u002F \u003C-- function call returns the value\n",{"type":47,"tag":88,"props":299,"children":301},{"class":90,"line":300},9,[302,306,311,315,320,325,329,334,338],{"type":47,"tag":88,"props":303,"children":304},{"style":168},[305],{"type":53,"value":267},{"type":47,"tag":88,"props":307,"children":308},{"style":107},[309],{"type":53,"value":310}," stripe",{"type":47,"tag":88,"props":312,"children":313},{"style":101},[314],{"type":53,"value":277},{"type":47,"tag":88,"props":316,"children":317},{"style":101},[318],{"type":53,"value":319}," new",{"type":47,"tag":88,"props":321,"children":322},{"style":184},[323],{"type":53,"value":324}," Stripe",{"type":47,"tag":88,"props":326,"children":327},{"style":285},[328],{"type":53,"value":191},{"type":47,"tag":88,"props":330,"children":331},{"style":107},[332],{"type":53,"value":333},"key",{"type":47,"tag":88,"props":335,"children":336},{"style":285},[337],{"type":53,"value":209},{"type":47,"tag":88,"props":339,"children":340},{"style":101},[341],{"type":53,"value":141},{"type":47,"tag":88,"props":343,"children":345},{"class":90,"line":344},10,[346],{"type":47,"tag":88,"props":347,"children":348},{"style":158},[349],{"type":53,"value":350},"  \u002F\u002F ...\n",{"type":47,"tag":88,"props":352,"children":354},{"class":90,"line":353},11,[355],{"type":47,"tag":88,"props":356,"children":357},{"style":101},[358],{"type":53,"value":359},"}\n",{"type":47,"tag":63,"props":361,"children":362},{},[363],{"type":53,"value":364},"Secret names are globally unique across the application (the same name resolves to the same value everywhere).",{"type":47,"tag":56,"props":366,"children":368},{"id":367},"setting-values",[369],{"type":53,"value":370},"Setting values",{"type":47,"tag":78,"props":372,"children":376},{"className":373,"code":374,"language":375,"meta":82,"style":82},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","# Set per environment type\nencore secret set --type prod StripeSecretKey\nencore secret set --type dev StripeSecretKey\nencore secret set --type local StripeSecretKey\n","bash",[377],{"type":47,"tag":69,"props":378,"children":379},{"__ignoreMap":82},[380,388,420,448],{"type":47,"tag":88,"props":381,"children":382},{"class":90,"line":91},[383],{"type":47,"tag":88,"props":384,"children":385},{"style":158},[386],{"type":53,"value":387},"# Set per environment type\n",{"type":47,"tag":88,"props":389,"children":390},{"class":90,"line":144},[391,396,400,405,410,415],{"type":47,"tag":88,"props":392,"children":394},{"style":393},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[395],{"type":53,"value":8},{"type":47,"tag":88,"props":397,"children":398},{"style":128},[399],{"type":53,"value":110},{"type":47,"tag":88,"props":401,"children":402},{"style":128},[403],{"type":53,"value":404}," set",{"type":47,"tag":88,"props":406,"children":407},{"style":128},[408],{"type":53,"value":409}," --type",{"type":47,"tag":88,"props":411,"children":412},{"style":128},[413],{"type":53,"value":414}," prod",{"type":47,"tag":88,"props":416,"children":417},{"style":128},[418],{"type":53,"value":419}," StripeSecretKey\n",{"type":47,"tag":88,"props":421,"children":422},{"class":90,"line":154},[423,427,431,435,439,444],{"type":47,"tag":88,"props":424,"children":425},{"style":393},[426],{"type":53,"value":8},{"type":47,"tag":88,"props":428,"children":429},{"style":128},[430],{"type":53,"value":110},{"type":47,"tag":88,"props":432,"children":433},{"style":128},[434],{"type":53,"value":404},{"type":47,"tag":88,"props":436,"children":437},{"style":128},[438],{"type":53,"value":409},{"type":47,"tag":88,"props":440,"children":441},{"style":128},[442],{"type":53,"value":443}," dev",{"type":47,"tag":88,"props":445,"children":446},{"style":128},[447],{"type":53,"value":419},{"type":47,"tag":88,"props":449,"children":450},{"class":90,"line":164},[451,455,459,463,467,472],{"type":47,"tag":88,"props":452,"children":453},{"style":393},[454],{"type":53,"value":8},{"type":47,"tag":88,"props":456,"children":457},{"style":128},[458],{"type":53,"value":110},{"type":47,"tag":88,"props":460,"children":461},{"style":128},[462],{"type":53,"value":404},{"type":47,"tag":88,"props":464,"children":465},{"style":128},[466],{"type":53,"value":409},{"type":47,"tag":88,"props":468,"children":469},{"style":128},[470],{"type":53,"value":471}," local",{"type":47,"tag":88,"props":473,"children":474},{"style":128},[475],{"type":53,"value":419},{"type":47,"tag":63,"props":477,"children":478},{},[479,481,487,489,495,497,503,504,510,511,517,518,524,525,531],{"type":53,"value":480},"Environment types: ",{"type":47,"tag":69,"props":482,"children":484},{"className":483},[],[485],{"type":53,"value":486},"production",{"type":53,"value":488}," (alias ",{"type":47,"tag":69,"props":490,"children":492},{"className":491},[],[493],{"type":53,"value":494},"prod",{"type":53,"value":496},"), ",{"type":47,"tag":69,"props":498,"children":500},{"className":499},[],[501],{"type":53,"value":502},"development",{"type":53,"value":488},{"type":47,"tag":69,"props":505,"children":507},{"className":506},[],[508],{"type":53,"value":509},"dev",{"type":53,"value":496},{"type":47,"tag":69,"props":512,"children":514},{"className":513},[],[515],{"type":53,"value":516},"preview",{"type":53,"value":488},{"type":47,"tag":69,"props":519,"children":521},{"className":520},[],[522],{"type":53,"value":523},"pr",{"type":53,"value":496},{"type":47,"tag":69,"props":526,"children":528},{"className":527},[],[529],{"type":53,"value":530},"local",{"type":53,"value":532},".",{"type":47,"tag":56,"props":534,"children":536},{"id":535},"local-overrides",[537],{"type":53,"value":538},"Local overrides",{"type":47,"tag":63,"props":540,"children":541},{},[542,544,550,552,558],{"type":53,"value":543},"For local development without going through ",{"type":47,"tag":69,"props":545,"children":547},{"className":546},[],[548],{"type":53,"value":549},"encore secret set",{"type":53,"value":551},", create a ",{"type":47,"tag":69,"props":553,"children":555},{"className":554},[],[556],{"type":53,"value":557},".secrets.local.cue",{"type":53,"value":559}," file at the repo root (gitignore it):",{"type":47,"tag":78,"props":561,"children":565},{"className":562,"code":563,"language":564,"meta":82,"style":82},"language-cue shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","StripeSecretKey: \"sk_test_local_...\"\nGitHubAPIToken:  \"ghp_local_...\"\n","cue",[566],{"type":47,"tag":69,"props":567,"children":568},{"__ignoreMap":82},[569,577],{"type":47,"tag":88,"props":570,"children":571},{"class":90,"line":91},[572],{"type":47,"tag":88,"props":573,"children":574},{},[575],{"type":53,"value":576},"StripeSecretKey: \"sk_test_local_...\"\n",{"type":47,"tag":88,"props":578,"children":579},{"class":90,"line":144},[580],{"type":47,"tag":88,"props":581,"children":582},{},[583],{"type":53,"value":584},"GitHubAPIToken:  \"ghp_local_...\"\n",{"type":47,"tag":56,"props":586,"children":588},{"id":587},"common-usage-patterns",[589],{"type":53,"value":590},"Common usage patterns",{"type":47,"tag":78,"props":592,"children":594},{"className":80,"code":593,"language":25,"meta":82,"style":82},"\u002F\u002F HTTP headers\nconst githubToken = secret(\"GitHubAPIToken\");\nconst resp = await fetch(\"https:\u002F\u002Fapi.github.com\u002Fuser\", {\n  headers: { Authorization: `token ${githubToken()}` },\n});\n\n\u002F\u002F Webhook signature verification\nconst stripeWebhookSecret = secret(\"StripeWebhookSecret\");\nstripe.webhooks.constructEvent(rawBody, sig, stripeWebhookSecret());\n\n\u002F\u002F Connecting to a third-party SDK\nconst openaiKey = secret(\"OpenAIKey\");\nconst openai = new OpenAI({ apiKey: openaiKey() });\n",[595],{"type":47,"tag":69,"props":596,"children":597},{"__ignoreMap":82},[598,606,651,703,763,779,786,794,839,897,904,912,958],{"type":47,"tag":88,"props":599,"children":600},{"class":90,"line":91},[601],{"type":47,"tag":88,"props":602,"children":603},{"style":158},[604],{"type":53,"value":605},"\u002F\u002F HTTP headers\n",{"type":47,"tag":88,"props":607,"children":608},{"class":90,"line":144},[609,613,618,622,626,630,634,639,643,647],{"type":47,"tag":88,"props":610,"children":611},{"style":168},[612],{"type":53,"value":171},{"type":47,"tag":88,"props":614,"children":615},{"style":107},[616],{"type":53,"value":617}," githubToken ",{"type":47,"tag":88,"props":619,"children":620},{"style":101},[621],{"type":53,"value":181},{"type":47,"tag":88,"props":623,"children":624},{"style":184},[625],{"type":53,"value":110},{"type":47,"tag":88,"props":627,"children":628},{"style":107},[629],{"type":53,"value":191},{"type":47,"tag":88,"props":631,"children":632},{"style":101},[633],{"type":53,"value":136},{"type":47,"tag":88,"props":635,"children":636},{"style":128},[637],{"type":53,"value":638},"GitHubAPIToken",{"type":47,"tag":88,"props":640,"children":641},{"style":101},[642],{"type":53,"value":136},{"type":47,"tag":88,"props":644,"children":645},{"style":107},[646],{"type":53,"value":209},{"type":47,"tag":88,"props":648,"children":649},{"style":101},[650],{"type":53,"value":141},{"type":47,"tag":88,"props":652,"children":653},{"class":90,"line":154},[654,658,663,667,672,677,681,685,690,694,699],{"type":47,"tag":88,"props":655,"children":656},{"style":168},[657],{"type":53,"value":171},{"type":47,"tag":88,"props":659,"children":660},{"style":107},[661],{"type":53,"value":662}," resp ",{"type":47,"tag":88,"props":664,"children":665},{"style":101},[666],{"type":53,"value":181},{"type":47,"tag":88,"props":668,"children":669},{"style":95},[670],{"type":53,"value":671}," await",{"type":47,"tag":88,"props":673,"children":674},{"style":184},[675],{"type":53,"value":676}," fetch",{"type":47,"tag":88,"props":678,"children":679},{"style":107},[680],{"type":53,"value":191},{"type":47,"tag":88,"props":682,"children":683},{"style":101},[684],{"type":53,"value":136},{"type":47,"tag":88,"props":686,"children":687},{"style":128},[688],{"type":53,"value":689},"https:\u002F\u002Fapi.github.com\u002Fuser",{"type":47,"tag":88,"props":691,"children":692},{"style":101},[693],{"type":53,"value":136},{"type":47,"tag":88,"props":695,"children":696},{"style":101},[697],{"type":53,"value":698},",",{"type":47,"tag":88,"props":700,"children":701},{"style":101},[702],{"type":53,"value":258},{"type":47,"tag":88,"props":704,"children":705},{"class":90,"line":164},[706,711,716,720,725,729,734,739,744,749,753,758],{"type":47,"tag":88,"props":707,"children":708},{"style":285},[709],{"type":53,"value":710},"  headers",{"type":47,"tag":88,"props":712,"children":713},{"style":101},[714],{"type":53,"value":715},":",{"type":47,"tag":88,"props":717,"children":718},{"style":101},[719],{"type":53,"value":104},{"type":47,"tag":88,"props":721,"children":722},{"style":285},[723],{"type":53,"value":724}," Authorization",{"type":47,"tag":88,"props":726,"children":727},{"style":101},[728],{"type":53,"value":715},{"type":47,"tag":88,"props":730,"children":731},{"style":101},[732],{"type":53,"value":733}," `",{"type":47,"tag":88,"props":735,"children":736},{"style":128},[737],{"type":53,"value":738},"token ",{"type":47,"tag":88,"props":740,"children":741},{"style":101},[742],{"type":53,"value":743},"${",{"type":47,"tag":88,"props":745,"children":746},{"style":184},[747],{"type":53,"value":748},"githubToken",{"type":47,"tag":88,"props":750,"children":751},{"style":107},[752],{"type":53,"value":253},{"type":47,"tag":88,"props":754,"children":755},{"style":101},[756],{"type":53,"value":757},"}`",{"type":47,"tag":88,"props":759,"children":760},{"style":101},[761],{"type":53,"value":762}," },\n",{"type":47,"tag":88,"props":764,"children":765},{"class":90,"line":31},[766,771,775],{"type":47,"tag":88,"props":767,"children":768},{"style":101},[769],{"type":53,"value":770},"}",{"type":47,"tag":88,"props":772,"children":773},{"style":107},[774],{"type":53,"value":209},{"type":47,"tag":88,"props":776,"children":777},{"style":101},[778],{"type":53,"value":141},{"type":47,"tag":88,"props":780,"children":781},{"class":90,"line":223},[782],{"type":47,"tag":88,"props":783,"children":784},{"emptyLinePlaceholder":148},[785],{"type":53,"value":151},{"type":47,"tag":88,"props":787,"children":788},{"class":90,"line":232},[789],{"type":47,"tag":88,"props":790,"children":791},{"style":158},[792],{"type":53,"value":793},"\u002F\u002F Webhook signature verification\n",{"type":47,"tag":88,"props":795,"children":796},{"class":90,"line":261},[797,801,806,810,814,818,822,827,831,835],{"type":47,"tag":88,"props":798,"children":799},{"style":168},[800],{"type":53,"value":171},{"type":47,"tag":88,"props":802,"children":803},{"style":107},[804],{"type":53,"value":805}," stripeWebhookSecret ",{"type":47,"tag":88,"props":807,"children":808},{"style":101},[809],{"type":53,"value":181},{"type":47,"tag":88,"props":811,"children":812},{"style":184},[813],{"type":53,"value":110},{"type":47,"tag":88,"props":815,"children":816},{"style":107},[817],{"type":53,"value":191},{"type":47,"tag":88,"props":819,"children":820},{"style":101},[821],{"type":53,"value":136},{"type":47,"tag":88,"props":823,"children":824},{"style":128},[825],{"type":53,"value":826},"StripeWebhookSecret",{"type":47,"tag":88,"props":828,"children":829},{"style":101},[830],{"type":53,"value":136},{"type":47,"tag":88,"props":832,"children":833},{"style":107},[834],{"type":53,"value":209},{"type":47,"tag":88,"props":836,"children":837},{"style":101},[838],{"type":53,"value":141},{"type":47,"tag":88,"props":840,"children":841},{"class":90,"line":300},[842,847,851,856,860,865,870,874,879,883,888,893],{"type":47,"tag":88,"props":843,"children":844},{"style":107},[845],{"type":53,"value":846},"stripe",{"type":47,"tag":88,"props":848,"children":849},{"style":101},[850],{"type":53,"value":532},{"type":47,"tag":88,"props":852,"children":853},{"style":107},[854],{"type":53,"value":855},"webhooks",{"type":47,"tag":88,"props":857,"children":858},{"style":101},[859],{"type":53,"value":532},{"type":47,"tag":88,"props":861,"children":862},{"style":184},[863],{"type":53,"value":864},"constructEvent",{"type":47,"tag":88,"props":866,"children":867},{"style":107},[868],{"type":53,"value":869},"(rawBody",{"type":47,"tag":88,"props":871,"children":872},{"style":101},[873],{"type":53,"value":698},{"type":47,"tag":88,"props":875,"children":876},{"style":107},[877],{"type":53,"value":878}," sig",{"type":47,"tag":88,"props":880,"children":881},{"style":101},[882],{"type":53,"value":698},{"type":47,"tag":88,"props":884,"children":885},{"style":184},[886],{"type":53,"value":887}," stripeWebhookSecret",{"type":47,"tag":88,"props":889,"children":890},{"style":107},[891],{"type":53,"value":892},"())",{"type":47,"tag":88,"props":894,"children":895},{"style":101},[896],{"type":53,"value":141},{"type":47,"tag":88,"props":898,"children":899},{"class":90,"line":344},[900],{"type":47,"tag":88,"props":901,"children":902},{"emptyLinePlaceholder":148},[903],{"type":53,"value":151},{"type":47,"tag":88,"props":905,"children":906},{"class":90,"line":353},[907],{"type":47,"tag":88,"props":908,"children":909},{"style":158},[910],{"type":53,"value":911},"\u002F\u002F Connecting to a third-party SDK\n",{"type":47,"tag":88,"props":913,"children":915},{"class":90,"line":914},12,[916,920,925,929,933,937,941,946,950,954],{"type":47,"tag":88,"props":917,"children":918},{"style":168},[919],{"type":53,"value":171},{"type":47,"tag":88,"props":921,"children":922},{"style":107},[923],{"type":53,"value":924}," openaiKey ",{"type":47,"tag":88,"props":926,"children":927},{"style":101},[928],{"type":53,"value":181},{"type":47,"tag":88,"props":930,"children":931},{"style":184},[932],{"type":53,"value":110},{"type":47,"tag":88,"props":934,"children":935},{"style":107},[936],{"type":53,"value":191},{"type":47,"tag":88,"props":938,"children":939},{"style":101},[940],{"type":53,"value":136},{"type":47,"tag":88,"props":942,"children":943},{"style":128},[944],{"type":53,"value":945},"OpenAIKey",{"type":47,"tag":88,"props":947,"children":948},{"style":101},[949],{"type":53,"value":136},{"type":47,"tag":88,"props":951,"children":952},{"style":107},[953],{"type":53,"value":209},{"type":47,"tag":88,"props":955,"children":956},{"style":101},[957],{"type":53,"value":141},{"type":47,"tag":88,"props":959,"children":961},{"class":90,"line":960},13,[962,966,971,975,979,984,988,993,998,1002,1007,1012,1016,1020],{"type":47,"tag":88,"props":963,"children":964},{"style":168},[965],{"type":53,"value":171},{"type":47,"tag":88,"props":967,"children":968},{"style":107},[969],{"type":53,"value":970}," openai ",{"type":47,"tag":88,"props":972,"children":973},{"style":101},[974],{"type":53,"value":181},{"type":47,"tag":88,"props":976,"children":977},{"style":101},[978],{"type":53,"value":319},{"type":47,"tag":88,"props":980,"children":981},{"style":184},[982],{"type":53,"value":983}," OpenAI",{"type":47,"tag":88,"props":985,"children":986},{"style":107},[987],{"type":53,"value":191},{"type":47,"tag":88,"props":989,"children":990},{"style":101},[991],{"type":53,"value":992},"{",{"type":47,"tag":88,"props":994,"children":995},{"style":285},[996],{"type":53,"value":997}," apiKey",{"type":47,"tag":88,"props":999,"children":1000},{"style":101},[1001],{"type":53,"value":715},{"type":47,"tag":88,"props":1003,"children":1004},{"style":184},[1005],{"type":53,"value":1006}," openaiKey",{"type":47,"tag":88,"props":1008,"children":1009},{"style":107},[1010],{"type":53,"value":1011},"() ",{"type":47,"tag":88,"props":1013,"children":1014},{"style":101},[1015],{"type":53,"value":770},{"type":47,"tag":88,"props":1017,"children":1018},{"style":107},[1019],{"type":53,"value":209},{"type":47,"tag":88,"props":1021,"children":1022},{"style":101},[1023],{"type":53,"value":141},{"type":47,"tag":56,"props":1025,"children":1027},{"id":1026},"guidelines",[1028],{"type":53,"value":1029},"Guidelines",{"type":47,"tag":1031,"props":1032,"children":1033},"ul",{},[1034,1048,1068,1080,1092],{"type":47,"tag":1035,"props":1036,"children":1037},"li",{},[1038,1040,1046],{"type":53,"value":1039},"Always declare ",{"type":47,"tag":69,"props":1041,"children":1043},{"className":1042},[],[1044],{"type":53,"value":1045},"secret(...)",{"type":53,"value":1047}," at package level, never inside functions.",{"type":47,"tag":1035,"props":1049,"children":1050},{},[1051,1053,1059,1061,1067],{"type":53,"value":1052},"Read with a function call: ",{"type":47,"tag":69,"props":1054,"children":1056},{"className":1055},[],[1057],{"type":53,"value":1058},"stripeKey()",{"type":53,"value":1060}," not ",{"type":47,"tag":69,"props":1062,"children":1064},{"className":1063},[],[1065],{"type":53,"value":1066},"stripeKey",{"type":53,"value":532},{"type":47,"tag":1035,"props":1069,"children":1070},{},[1071,1073,1079],{"type":53,"value":1072},"Set distinct values per environment via ",{"type":47,"tag":69,"props":1074,"children":1076},{"className":1075},[],[1077],{"type":53,"value":1078},"encore secret set --type \u003Cenv>",{"type":53,"value":532},{"type":47,"tag":1035,"props":1081,"children":1082},{},[1083,1085,1090],{"type":53,"value":1084},"Never commit secret values; use ",{"type":47,"tag":69,"props":1086,"children":1088},{"className":1087},[],[1089],{"type":53,"value":557},{"type":53,"value":1091}," for local overrides and gitignore it.",{"type":47,"tag":1035,"props":1093,"children":1094},{},[1095,1097,1103],{"type":53,"value":1096},"For webhook signature secrets specifically, see also the ",{"type":47,"tag":69,"props":1098,"children":1100},{"className":1099},[],[1101],{"type":53,"value":1102},"encore-webhook",{"type":53,"value":1104}," skill.",{"type":47,"tag":1106,"props":1107,"children":1108},"style",{},[1109],{"type":53,"value":1110},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":1112,"total":1212},[1113,1125,1137,1153,1169,1181,1197],{"slug":1114,"name":1114,"fn":1115,"description":1116,"org":1117,"tags":1118,"stars":27,"repoUrl":28,"updatedAt":1124},"encore-api","build type-safe APIs with Encore","Define typed API endpoints in Encore.ts using `api(...)` from `encore.dev\u002Fapi`. Covers typed request\u002Fresponse interfaces, path\u002Fquery\u002Fheader\u002Fcookie params, request validation, and `APIError`. For raw endpoints (`api.raw()`) and inbound webhooks, use `encore-webhook` instead.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1119,1122,1123],{"name":1120,"slug":1121,"type":16},"API Development","api-development",{"name":9,"slug":8,"type":16},{"name":24,"slug":25,"type":16},"2026-04-06T18:09:46.044101",{"slug":1126,"name":1126,"fn":1127,"description":1128,"org":1129,"tags":1130,"stars":27,"repoUrl":28,"updatedAt":1136},"encore-auth","implement Encore.ts authentication","Protect Encore.ts endpoints with authentication and authorize callers. Covers `authHandler`, `Gateway`, `getAuthData`, and `auth: true`.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1131,1134,1135],{"name":1132,"slug":1133,"type":16},"Auth","auth",{"name":9,"slug":8,"type":16},{"name":24,"slug":25,"type":16},"2026-04-06T18:09:47.336322",{"slug":1138,"name":1138,"fn":1139,"description":1140,"org":1141,"tags":1142,"stars":27,"repoUrl":28,"updatedAt":1152},"encore-bucket","store files in Encore.ts buckets","Store unstructured files in Encore.ts using `Bucket` from `encore.dev\u002Fstorage\u002Fobjects` — uploads, images, documents, blobs.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1143,1144,1145,1148,1151],{"name":21,"slug":22,"type":16},{"name":9,"slug":8,"type":16},{"name":1146,"slug":1147,"type":16},"File Storage","file-storage",{"name":1149,"slug":1150,"type":16},"File Uploads","file-uploads",{"name":24,"slug":25,"type":16},"2026-05-16T05:59:52.813772",{"slug":1154,"name":1154,"fn":1155,"description":1156,"org":1157,"tags":1158,"stars":27,"repoUrl":28,"updatedAt":1168},"encore-cache","cache data in Redis with Encore.ts","Cache data in Redis from Encore.ts using `CacheCluster` and typed keyspaces from `encore.dev\u002Fstorage\u002Fcache`. Type-safe key\u002Fvalue access with TTLs, atomic increments, and per-keyspace data shapes.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1159,1160,1163,1164,1167],{"name":21,"slug":22,"type":16},{"name":1161,"slug":1162,"type":16},"Caching","caching",{"name":9,"slug":8,"type":16},{"name":1165,"slug":1166,"type":16},"Redis","redis",{"name":24,"slug":25,"type":16},"2026-05-16T05:59:56.808328",{"slug":1170,"name":1170,"fn":1171,"description":1172,"org":1173,"tags":1174,"stars":27,"repoUrl":28,"updatedAt":1180},"encore-code-review","review Encore.ts code","Review existing Encore.ts code for best practices and common anti-patterns.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1175,1178,1179],{"name":1176,"slug":1177,"type":16},"Code Review","code-review",{"name":9,"slug":8,"type":16},{"name":24,"slug":25,"type":16},"2026-04-06T18:10:01.123999",{"slug":1182,"name":1182,"fn":1183,"description":1184,"org":1185,"tags":1186,"stars":27,"repoUrl":28,"updatedAt":1196},"encore-cron","schedule recurring jobs in Encore.ts","Schedule periodic \u002F recurring work in Encore.ts using `CronJob` from `encore.dev\u002Fcron`. Covers `every: \"1h\"` interval syntax and `schedule: \"0 9 * * 1\"` cron expressions.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1187,1190,1191,1192,1195],{"name":1188,"slug":1189,"type":16},"Automation","automation",{"name":21,"slug":22,"type":16},{"name":9,"slug":8,"type":16},{"name":1193,"slug":1194,"type":16},"Scheduling","scheduling",{"name":24,"slug":25,"type":16},"2026-05-16T05:59:54.146651",{"slug":1198,"name":1198,"fn":1199,"description":1200,"org":1201,"tags":1202,"stars":27,"repoUrl":28,"updatedAt":1211},"encore-database","build Encore databases","Work with PostgreSQL in Encore.ts using `SQLDatabase` from `encore.dev\u002Fstorage\u002Fsqldb` — schema migrations and SQL queries.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1203,1206,1207,1210],{"name":1204,"slug":1205,"type":16},"Database","database",{"name":9,"slug":8,"type":16},{"name":1208,"slug":1209,"type":16},"ORM","orm",{"name":24,"slug":25,"type":16},"2026-04-06T18:09:54.823017",28,{"items":1214,"total":1212},[1215,1221,1227,1235,1243,1249,1257,1264,1281,1298,1310,1321],{"slug":1114,"name":1114,"fn":1115,"description":1116,"org":1216,"tags":1217,"stars":27,"repoUrl":28,"updatedAt":1124},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1218,1219,1220],{"name":1120,"slug":1121,"type":16},{"name":9,"slug":8,"type":16},{"name":24,"slug":25,"type":16},{"slug":1126,"name":1126,"fn":1127,"description":1128,"org":1222,"tags":1223,"stars":27,"repoUrl":28,"updatedAt":1136},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1224,1225,1226],{"name":1132,"slug":1133,"type":16},{"name":9,"slug":8,"type":16},{"name":24,"slug":25,"type":16},{"slug":1138,"name":1138,"fn":1139,"description":1140,"org":1228,"tags":1229,"stars":27,"repoUrl":28,"updatedAt":1152},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1230,1231,1232,1233,1234],{"name":21,"slug":22,"type":16},{"name":9,"slug":8,"type":16},{"name":1146,"slug":1147,"type":16},{"name":1149,"slug":1150,"type":16},{"name":24,"slug":25,"type":16},{"slug":1154,"name":1154,"fn":1155,"description":1156,"org":1236,"tags":1237,"stars":27,"repoUrl":28,"updatedAt":1168},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1238,1239,1240,1241,1242],{"name":21,"slug":22,"type":16},{"name":1161,"slug":1162,"type":16},{"name":9,"slug":8,"type":16},{"name":1165,"slug":1166,"type":16},{"name":24,"slug":25,"type":16},{"slug":1170,"name":1170,"fn":1171,"description":1172,"org":1244,"tags":1245,"stars":27,"repoUrl":28,"updatedAt":1180},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1246,1247,1248],{"name":1176,"slug":1177,"type":16},{"name":9,"slug":8,"type":16},{"name":24,"slug":25,"type":16},{"slug":1182,"name":1182,"fn":1183,"description":1184,"org":1250,"tags":1251,"stars":27,"repoUrl":28,"updatedAt":1196},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1252,1253,1254,1255,1256],{"name":1188,"slug":1189,"type":16},{"name":21,"slug":22,"type":16},{"name":9,"slug":8,"type":16},{"name":1193,"slug":1194,"type":16},{"name":24,"slug":25,"type":16},{"slug":1198,"name":1198,"fn":1199,"description":1200,"org":1258,"tags":1259,"stars":27,"repoUrl":28,"updatedAt":1211},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1260,1261,1262,1263],{"name":1204,"slug":1205,"type":16},{"name":9,"slug":8,"type":16},{"name":1208,"slug":1209,"type":16},{"name":24,"slug":25,"type":16},{"slug":1265,"name":1265,"fn":1266,"description":1267,"org":1268,"tags":1269,"stars":27,"repoUrl":28,"updatedAt":1280},"encore-frontend","connect frontend to Encore backend","Connect a frontend application (React, Next.js, Vue, Svelte, etc.) to an Encore.ts backend.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1270,1271,1274,1277],{"name":9,"slug":8,"type":16},{"name":1272,"slug":1273,"type":16},"Frontend","frontend",{"name":1275,"slug":1276,"type":16},"Next.js","next-js",{"name":1278,"slug":1279,"type":16},"React","react","2026-04-06T18:09:56.091006",{"slug":1282,"name":1282,"fn":1283,"description":1284,"org":1285,"tags":1286,"stars":27,"repoUrl":28,"updatedAt":1297},"encore-getting-started","build and run applications with Encore.ts","Bootstrap a brand-new Encore.ts project from zero. Only for first-time CLI install and `encore app create` — not for architecture or feature questions.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1287,1288,1289,1290,1293,1294],{"name":1120,"slug":1121,"type":16},{"name":21,"slug":22,"type":16},{"name":9,"slug":8,"type":16},{"name":1291,"slug":1292,"type":16},"Local Development","local-development",{"name":24,"slug":25,"type":16},{"name":1295,"slug":1296,"type":16},"Web Development","web-development","2026-04-06T18:10:04.885446",{"slug":1299,"name":1299,"fn":1300,"description":1301,"org":1302,"tags":1303,"stars":27,"repoUrl":28,"updatedAt":1309},"encore-go-api","build APIs with Encore Go","Define typed API endpoints in Encore Go using `\u002F\u002Fencore:api` annotations. Covers typed request\u002Fresponse structs, path\u002Fquery\u002Fheader\u002Fcookie params, and error returns. For raw endpoints (`\u002F\u002Fencore:api raw`) and inbound webhooks, use `encore-go-webhook` instead.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1304,1305,1306],{"name":1120,"slug":1121,"type":16},{"name":9,"slug":8,"type":16},{"name":1307,"slug":1308,"type":16},"Go","go","2026-04-06T18:09:48.578781",{"slug":1311,"name":1311,"fn":1312,"description":1313,"org":1314,"tags":1315,"stars":27,"repoUrl":28,"updatedAt":1320},"encore-go-auth","implement authentication with Encore Go","Protect Encore Go endpoints with authentication and authorize callers. Covers `auth.AuthHandler`, `auth.UserID`, the `Authorization` header, and `\u002F\u002Fencore:api auth`.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1316,1317,1318,1319],{"name":1132,"slug":1133,"type":16},{"name":21,"slug":22,"type":16},{"name":9,"slug":8,"type":16},{"name":1307,"slug":1308,"type":16},"2026-04-06T18:09:51.065102",{"slug":1322,"name":1322,"fn":1323,"description":1324,"org":1325,"tags":1326,"stars":27,"repoUrl":28,"updatedAt":1334},"encore-go-bucket","store files in Encore Go buckets","Store unstructured files in Encore Go using `objects.NewBucket` from `encore.dev\u002Fstorage\u002Fobjects` — uploads, images, documents, blobs.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1327,1328,1329,1330,1331],{"name":21,"slug":22,"type":16},{"name":9,"slug":8,"type":16},{"name":1146,"slug":1147,"type":16},{"name":1307,"slug":1308,"type":16},{"name":1332,"slug":1333,"type":16},"Storage","storage","2026-05-16T06:00:03.633918"]