Templates and variables
Template phrases reuse one body with values that change each time. Placeholders look like {{customer_name}}. Astramar resolves them before delivery and never leaves raw braces in the inserted text when a prompt or automatic source can fill them.
Create a template phrase
Section titled “Create a template phrase”- Select a phrase and turn on Use as template in the Phrase editor.
- Add placeholders with
{{name}}in the body. They appear as soft accent pills; the saved text stays plain{{name}}characters. - While editing, type
{{(or a partial name) for autocomplete of phrase variables, shared variables, then built-ins. Tab or Return inserts the selected token. - Review Template Variables. Unresolved variables show as inline alerts near the relevant control.
Variable sources
Section titled “Variable sources”Each placeholder can use:
| Source | Behavior |
|---|---|
| Phrase Default | A value stored on that phrase |
| Shared Variable | One saved value reused across many phrases (Settings → Templates) |
| Built-In | A value resolved at insert time |
Prompt before insert (per variable):
- On — Astramar prompts before paste/copy and prefills from the selected source.
- Off — Astramar inserts the source value automatically when it can.
When the palette asks you to complete variables, use Tab / ⇧ Tab between fields. Return advances and delivers on the last field; ⌘ Return copies; ⇧ Return delivers and keeps the palette open.
Common built-ins
Section titled “Common built-ins”Useful Free Beta built-ins include:
- Date and time —
{{date}},{{time}},{{datetime}},{{iso_date}},{{iso_datetime}},{{year}},{{tomorrow}},{{yesterday}} - Offsets — e.g.
{{date_plus_7d}},{{iso_date_minus_1d}}(1–365 days) - Identity / device —
{{uuid}},{{username}},{{short_username}},{{hostname}} - Context —
{{clipboard}},{{clipboard_1}}…{{clipboard_3}},{{frontmost_app}},{{selected_text}}(Accessibility; empty when unavailable)
Clipboard-derived values can contain sensitive data — prefer synthetic samples while testing.
Shared variables
Section titled “Shared variables”- Open Settings → Templates.
- Add a shared variable with a name and value.
- On a template phrase, set a placeholder source to Shared Variable and pick it from the list.
Renaming or removing a referenced shared variable asks how to rewrite or leave unresolved {{name}} tokens. Differently cased tokens stay as written.
Template sandbox
Section titled “Template sandbox”In Advanced, the inspector includes a local template sandbox for testing placeholder values and previewing the resolved phrase. Sandbox values do not rewrite the saved phrase body.