Every built-in template function, with its arguments
Templating
On this page
Every template function below is built in and available without installing anything. Use
them anywhere Yaak accepts text, with the ${[ name(arg='value') ]} syntax described in
Template Functions.
Run yaak func show <name> to see the full argument definition for any function, or
yaak func list to list what’s installed β including functions added by your own plugins,
which won’t appear here.
1password
Function
Description
1password.item(vault, item, field)
Get a secret.
base64
Function
Description
base64.decode(value)
Decode a value from base64.
base64.encode(encoding=base64, value)
Encode a value to base64.
cookie
Function
Description
cookie.value(name, domain?)
Read the value of a cookie in the jar, by name.
ctx
Function
Description
ctx.environment()
Get the ID of the currently active environment.
ctx.request()
Get the ID of the currently active request.
ctx.workspace()
Get the ID of the currently active workspace.
fs
Function
Description
fs.readFile(path, encoding=utf8, trim)
Read the contents of a file as utf-8.
hash
Function
Description
hash.md5(input, encoding=base64)
Hash a value to its hexadecimal representation.
hash.sha1(input, encoding=base64)
Hash a value to its hexadecimal representation.
hash.sha256(input, encoding=base64)
Hash a value to its hexadecimal representation.
hash.sha512(input, encoding=base64)
Hash a value to its hexadecimal representation.
hmac
Function
Description
hmac.md5(input, key, encoding=base64)
Compute the HMAC of a value.
hmac.sha1(input, key, encoding=base64)
Compute the HMAC of a value.
hmac.sha256(input, key, encoding=base64)
Compute the HMAC of a value.
hmac.sha512(input, key, encoding=base64)
Compute the HMAC of a value.
json
Function
Description
json.escape(input)
Escape a JSON string, useful when using the output in JSON values.
json.jsonpath(input, formatted, query)
Filter JSON-formatted text using JSONPath syntax.
json.minify(input)
Remove unnecessary whitespace from a valid JSON string.
keychain
Function
Description
keychain(service, account)
Access application passwords from the macOS Login keychain. Also available as keyring.
keychain reads from whichever secret store the host OS provides. The description above is the macOS one; on Windows it reads from Credential Manager, and on Linux from the Secret Service (GNOME Keyring, KWallet, and similar).