Skip to content

Commit 5430221

Browse files
continue[bot]sestinjTing-Wai ToContinue
authored
docs: clarify secrets vs inputs syntax usage (#8166)
Add info blocks to documentation explaining when to use secrets. vs inputs. syntax: - Recommend secrets. as the default for most use cases - Explain inputs. provides flexibility for reusable blocks - Reference GitHub Actions pattern for clarity This addresses user confusion around the two syntaxes and provides clear guidance on when each should be used. Generated with [Continue](https://continue.dev) Co-authored-by: Continue Agent <[email protected]> Co-authored-by: Ting-Wai To <[email protected]> Co-authored-by: Continue <[email protected]>
1 parent f8a13ab commit 5430221

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

docs/guides/configuring-models-rules-tools.mdx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,19 @@ When configuring a local model or MCP server, you can use the same mustache nota
107107
</Card>
108108
</Columns>
109109

110+
<Info>
111+
**When to use `secrets.` vs `inputs.`**
112+
113+
For most use cases, **use `${{ secrets.SECRET_NAME }}`** directly in your configuration. This is the recommended approach for both personal and organizational workflows.
114+
115+
Use `${{ inputs.INPUT_NAME }}` only when you need flexibility to:
116+
- Allow users to customize which secret a block uses without editing the block itself
117+
- Change the secret name without modifying the block configuration
118+
- Create reusable blocks where different users may have differently-named secrets
119+
120+
This pattern is inspired by GitHub Actions, where inputs provide an abstraction layer between block definitions and user-specific values. For most scenarios, directly referencing `secrets.` keeps configuration simpler and more straightforward.
121+
</Info>
122+
110123
## Overriding Properties
111124

112125
You can directly override properties using the `override` syntax:

docs/hub/blocks/create-a-block.mdx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,13 @@ After filling out information on the block, you will want to create a block foll
2727
### Block Inputs
2828

2929
Blocks can receive values, including secrets, as inputs through templating. For values that the user of the block needs to set, you can use template variables (e.g. `${{ inputs.API_KEY}}`). Then, the user can set `API_KEY: ${{ secrets.MY_API_KEY }}` in the `with` clause of their agent.
30+
31+
<Info>
32+
**Choosing between `secrets.` and `inputs.`**
33+
34+
When creating blocks for the hub:
35+
- Use `${{ inputs.INPUT_NAME }}` in your block definition when you want users to be able to customize which secret is used
36+
- Users will then map their own secrets using `${{ secrets.SECRET_NAME }}` in the `with` clause
37+
38+
For personal or single-use configurations, you can skip the inputs layer and reference `${{ secrets.SECRET_NAME }}` directly in your block.
39+
</Info>

0 commit comments

Comments
 (0)