Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.ellomas.com/llms.txt

Use this file to discover all available pages before exploring further.

Templating and Functions

Replay uses Handlebars-style {{ var }} syntax for variable interpolation, plus 45 built-in functions for data transformation.

Variable Interpolation

Any string field in a step can reference state variables:
- name: dynamic-request
  type: http
  request:
    url: /users/{{ user_id }}
    headers:
      Authorization: Bearer {{ token }}
    body:
      name: "{{ user_name }}"
      email: "{{ user_email }}"
Variables are resolved at execution time from the current state bag.

Nested Access

Access nested fields with dot notation:
name: "{{ config.http.base_url }}"
message: "Hello {{ user.profile.first_name }}"

Environment Variables

Environment variables are loaded into the global scope at startup. Access them directly:
config:
  postgres:
    dsn: postgres://{{ POSTGRES_USER }}:{{ POSTGRES_PASSWORD }}@localhost:5433/mydb

Built-in Functions

String Functions

FunctionDescriptionExampleResult
upperConvert to uppercase{{upper "hello"}}HELLO
lowerConvert to lowercase{{lower "HELLO"}}hello
upperFirstCapitalize first letter{{upperFirst "hello"}}Hello
lowerFirstLowercase first letter{{lowerFirst "Hello"}}hello
trimTrim whitespace{{trim " hi "}}hi
replaceReplace all occurrences{{replace "a-b-c" "-" "."}}a.b.c
containsCheck substring{{contains "hello" "ell"}}true
startsWithCheck prefix{{startsWith "hello" "he"}}true
endsWithCheck suffix{{endsWith "hello" "lo"}}true
splitSplit string{{split "a,b,c" ","}}["a","b","c"]
joinJoin array{{join (split "a,b" ",") "-"}}a-b
truncateTruncate with ellipsis{{truncate "hello world" 8}}hello...
padLeftPad left{{padLeft "42" 5 "0"}}00042
padRightPad right{{padRight "42" 5 "."}}42...
repeatRepeat string{{repeat "ab" 3}}ababab
regexMatchRegex test{{regexMatch "^\\d+$" "123"}}true
regexFindRegex find first{{regexFind "\\d+" "abc123def"}}123

Math Functions

FunctionDescriptionExampleResult
addAddition{{add 5 3}}8
subSubtraction{{sub 10 4}}6
mulMultiplication{{mul 3 4}}12
divDivision{{div 10 3}}3.333
modModulo{{mod 10 3}}1
minMinimum{{min 5 3}}3
maxMaximum{{max 5 3}}5
roundRound{{round 3.7}}4
absAbsolute value{{abs -5}}5
ceilCeiling{{ceil 3.2}}4
floorFloor{{floor 3.8}}3

Date Functions

FunctionDescriptionExampleResult
nowCurrent UTC time (RFC3339){{now}}2026-06-03T12:00:00Z
nowUnixCurrent Unix timestamp{{nowUnix}}1759507200
addMinutesAdd minutes{{addMinutes "2026-01-01T00:00:00Z" 30}}2026-01-01T00:30:00Z
addHoursAdd hours{{addHours "2026-01-01T00:00:00Z" 2}}2026-01-01T02:00:00Z
addDaysAdd days{{addDays "2026-01-01T00:00:00Z" 7}}2026-01-08T00:00:00Z
formatDateFormat date{{formatDate "2026-01-01T00:00:00Z" "2006-01-02"}}2026-01-01
parseDateParse date string{{parseDate "2026-01-01" "2006-01-02"}}2026-01-01T00:00:00Z
dateSubDate difference (seconds){{dateSub "2026-01-02T00:00:00Z" "2026-01-01T00:00:00Z"}}86400

JSON Functions

FunctionDescription
jsonStringifyConvert value to JSON string
jsonParseParse JSON string to value
jsonPickExtract nested value from object by path
jsonKeysGet object keys
jsonValuesGet object values
objectBuild object from key-value pairs
mergeMerge two objects

Type Conversion Functions

FunctionDescription
toIntConvert to integer
toFloatConvert to float
toStringConvert to string
lenLength of string, array, or object

Combining Functions

Functions can be nested:
message: "{{ upper (trim user_name) }}"
message: "{{ add (toInt count) 1 }}"
message: "{{ join (split tags ",") ", " }}"

What’s Next?