Practical examples for common template workflows.
cat > values.yaml <<'EOF'
variables:
- key: APP_NAME
value: TemplateTester
- key: PROJECT_NAME
value: DemoProject
- key: USER_NAME
value: tester
- key: USER_EMAIL
value: tester@example.com
- key: VERSION
value: 9.9.9
EOF
yankrun clone \
--repo https://github.com/AxeForging/template-tester.git \
--input values.yaml \
--outputDir ./template-testyankrun serve --dir ./template-test --input values.yamlOpen http://127.0.0.1:17817, then use:
- Local for the directory passed with
--dir - Clone for a direct SSH/HTTPS repo URL
- Generate for templates configured in
~/.yankrun/config.yaml
The workbench shows a file tree for each placeholder and evaluated transform previews such as APP_NAME:toUpperCase -> TEMPLATETESTER.
If the repo uses a different delimiter pair, you don't need to restart the server: edit the [[ ]] pair shown next to the directory path and click Set to rescan with the new pair. It applies to Local, Clone, and Generate alike.
yankrun clone \
--repo git@github.com:AxeForging/template-tester.git \
--branch main \
--input values.yaml \
--outputDir ./template-testThis uses the same local SSH setup as Git. If your key or agent works with git clone, YankRun should work too.
Create or edit ~/.yankrun/config.yaml:
templates:
- name: template-tester
url: https://github.com/AxeForging/template-tester.git
description: YankRun sample template repo
default_branch: mainThen run:
yankrun generate --template template-tester --input values.yaml --outputDir ./generated-appOr use the Generate tab in yankrun serve.
cat > updates.yaml <<'EOF'
variables:
- key: COMPANY_NAME
value: AxeForge
- key: SUPPORT_EMAIL
value: support@example.com
- key: VERSION
value: 2.0.0
EOF
yankrun template --dir ./project --input updates.yaml --dryRun
yankrun template --dir ./project --input updates.yamlYankRun defaults to [[ and ]], so it will not touch Helm/Go template syntax like {{ .Values.name }}.
If a project already uses [[ and ]], choose custom delimiters:
yankrun template \
--dir ./project \
--input values.yaml \
--startDelim "<%" \
--endDelim "%>"Template files can then contain:
name: <%APP_NAME%>
version: <%VERSION%>
yankrun template \
--dir ./project \
--input values.yaml \
--processTemplatesREADME.md.tpl becomes README.md after template processing. Existing target files are not overwritten silently.
Template:
Package: [[APP_NAME:toLowerCase]]
Constant: [[APP_NAME:toUpperCase]]
URL slug: [[PROJECT_NAME:gsub( ,-):toLowerCase]]
Values:
variables:
- key: APP_NAME
value: My App
- key: PROJECT_NAME
value: My ProjectResult:
Package: my app
Constant: MY APP
URL slug: my-project
Discover what a template needs, then apply — no temp files, no prompts:
# 1. Learn the variables (and manifest) as JSON
yankrun scan --dir ./project --json | jq '.data.keys, .data.manifest.variables'
# 2. Apply values piped from stdin, machine-readable result, never prompts
echo '{"variables":[{"key":"APP_NAME","value":"Widget"}]}' \
| yankrun template --dir ./project --input - --yes --json
# 3. Or inject values from the environment
YANKRUN_VAR_APP_NAME=Widget YANKRUN_VAR_ENV=prod \
yankrun template --dir ./project --yes --jsonPreview the exact edits without writing — the dry-run JSON carries per-file diffs:
yankrun template --dir ./project --input values.yaml --dryRun --json \
| jq -r '.data.summary.files[] | .diff'Re-running is idempotent: once placeholders are replaced, a second apply reports
0 matches and exits 0.
Register the stdio server with your MCP client (e.g. Claude Code):
{ "mcpServers": { "yankrun": { "command": "yankrun", "args": ["mcp"] } } }The agent can then call yankrun_scan, yankrun_apply (with dryRun for
diffs), yankrun_clone, yankrun_generate, yankrun_manifest, and
yankrun_templates directly.
- Run
yankrun serve --dir ./project --input values.yaml. - Preview a Local, Clone, or Generate run.
- The run is saved locally in browser IndexedDB.
- Use the left preset rail to search by repo, template, branch, output directory, or value keys.
- Export/import presets as JSON when moving between browsers.