Skip to main content
Add variables with double braces:
Pass values when resolving the prompt:
The returned content contains the rendered values. Runtime values may be strings, numbers, booleans, null, or undefined. Generated declarations type each variable as a string. Dots and hyphens belong to the key, so {{user.name}} reads variables["user.name"]. Use {{{{name}}}} to render the literal text {{name}}. When a variables object is present, every token needs a non-null value. A missing, null, or undefined value makes the call fail. Omit variables to return the unrendered template.

Generate types

The command writes anpord-env.d.ts:
For prompts with extracted variables, TypeScript checks the keys whenever a caller supplies variables. A generated prompt with no variables keeps the loose runtime map type. The variables property remains optional so callers may still request the raw template. Generation reads the first 100 prompts. Commit the generated file and regenerate it after adding, removing, or renaming a variable. Without generation, the SDK accepts any flat map of supported runtime values.