Template Variables
Use variables to create customizable blueprints that users can personalize when downloading.
Variable Syntax
Variables use double square brackets. You can optionally provide a default value:
Basic Variable
[[VARIABLE_NAME]]User must fill in a value
With Default Value
[[VARIABLE_NAME|default]]Pre-filled with your suggested value
Why this syntax?
- ✓
{{}}conflicts with Vue, Angular, Handlebars, Jinja2 - ✓
[[]]is distinctive and rarely used in code - ✓The
|pipe separator follows familiar shell/template conventions
Setting Default Values
As a blueprint creator, you can pre-fill variables with sensible defaults:
# [[PROJECT_NAME|My Awesome App]] Configuration
Framework: [[FRAMEWORK|Next.js]]
Database: [[DATABASE|PostgreSQL]]
Deploy to: [[DEPLOY_TARGET|Vercel]]
# Slack channel: #[[SLACK_CHANNEL|dev-team]]How defaults work
- • Defaults appear pre-filled when users download the blueprint
- • Users can modify or keep the default value
- • If a user has saved their own value for that variable, their saved value takes priority
- • The default is only used if the user hasn't saved their own preference
Saved User Variables
Users can save their own default values that apply across all blueprints:
- 1.When downloading a blueprint, click "Save" next to any variable to remember your value
- 2.Manage all saved variables in Settings → Saved Variables
- 3.Your saved values automatically pre-fill in future blueprint downloads
Priority Order
When downloading a blueprint, values are applied in this order:
- User's saved value (highest priority)
- Creator's default (from
[[VAR|default]]) - Empty (user must fill in)
Example
Here's a blueprint with template variables and defaults:
# [[PROJECT_NAME]] - AI Configuration
## Project Context
This is a [[PROJECT_TYPE|web]] project using [[FRAMEWORK|Next.js]].
Repository: [[REPO_URL]]
## Deployment
Deploy to [[K8S_CLUSTER|prod-cluster]] cluster using Helm.
Documentation at [[CONFLUENCE_URL]]/deployment-guide
## Team Contact
Team lead: [[TEAM_LEAD]]
Slack channel: #[[SLACK_CHANNEL|dev-team]]When someone downloads this blueprint:
- •
PROJECT_TYPEwill default to "web" - •
FRAMEWORKwill default to "Next.js" - •
REPO_URLandTEAM_LEADmust be filled in - • Users can change any value before downloading
Wizard-Generated Variables
When using the wizard in blueprint mode (CLI: lynxp wizard --blueprint), LynxPrompt automatically generates these standard variables:
[[PROJECT_NAME|...]]Project name from wizard input
[[PROJECT_DESCRIPTION|...]]Project description from wizard input
[[AUTHOR_NAME|...]]Author name for commit attribution
[[AUTHOR_EMAIL|...]]Author email for commit attribution
[[REPO_URL|...]]Repository URL (GitHub, GitLab, etc.)
[[LICENSE|...]]License type (MIT, Apache-2.0, etc.)
How to use blueprint mode
# CLI
lynxp wizard --blueprint
# Or with variable filling:
lynxp wizard --blueprint --vars "PROJECT_NAME=MyApp,LICENSE=MIT"
This creates config files with [[VAR|default]] placeholders instead of hardcoded values, making them reusable as templates.
Common Variable Names
Use these common variable names for consistency across blueprints:
[[PROJECT_NAME]]The name of the project
[[REPO_URL]]GitHub/GitLab repository URL
[[FRAMEWORK]]Primary framework (Next.js, Django, etc.)
[[K8S_CLUSTER]]Kubernetes cluster name
[[CONFLUENCE_URL]]Documentation base URL
[[TEAM_NAME]]Team or organization name
[[SLACK_CHANNEL]]Team Slack channel
[[API_BASE_URL]]Base URL for API endpoints
Best Practices
Use SCREAMING_SNAKE_CASE
Variable names should be uppercase with underscores: [[PROJECT_NAME]] not [[projectName]]
Note: Lowercase variables are automatically converted to uppercase internally, so [[myVar]] and [[MYVAR]] are treated identically.
Be Descriptive
Use clear, self-explanatory names. Users should understand what value to provide without extra documentation.
Don't Overuse
Only use variables for values that genuinely vary between users. Too many variables make blueprints tedious to use.
Provide Context
Add comments near variables explaining what values are expected. This helps users fill them in correctly.
Automatic Detection
When you create a blueprint, LynxPrompt automatically:
- ✓Detects all
[[...]]patterns - ✓Highlights variables in the preview
- ✓Shows a list of all variables for verification
- ✓Prompts users to fill in values when downloading