Public variables
Public variables let you customize claimed static artifacts without editing uploaded files. Add placeholders to text files, claim the site, then set values from the dashboard, CLI, API, or MCP.
How it works
- Placeholders like
{{ vars.PRODUCT_NAME }}in text files are replaced at serve time. - Variable names are uppercase letters, numbers, and underscores.
- Missing variables are left unchanged in the served file.
- Values are inserted literally into served text, JSON, JavaScript, XML, and SVG files.
- Variables may be visible in page source, JavaScript, stylesheets, network responses, or browser devtools.
Safe uses
- Product names, titles, headings
- Links and CTA URLs
- Colors and CSS values
- Analytics IDs and browser-safe publishable keys
- Public API base URLs
Do not use for
- Passwords
- Private API keys
- Secret tokens
- Anything that must remain hidden from visitors
Setting variables
CLI
npx attim login
npx attim variables list my-site
npx attim variables set my-site PRODUCT_NAME "Acme Analytics"
npx attim variables set my-site CTA_URL https://example.com
npx attim variables delete my-site PRODUCT_NAMEAPI
# List
curl https://attim.link/api/publish/my-site/variables \
-H "Authorization: Bearer YOUR_TOKEN"
# Set or update
curl -X PUT https://attim.link/api/publish/my-site/variables/PRODUCT_NAME \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"value":"Acme Analytics"}'
# Delete
curl -X DELETE https://attim.link/api/publish/my-site/variables/PRODUCT_NAME \
-H "Authorization: Bearer YOUR_TOKEN"MCP
Use the set_variables tool with slug and a dictionary of variables.
Limits
- 100 variables per site
- Names up to 64 characters
- Values up to 10,000 characters
- Rate limit: 60 mutations per minute per IP
