Dynamic variables
Dynamic variables start with $. Postguy generates a fresh value for every occurrence. Write them like any other variable, for example {{$guid}} in a URL, header, body or auth field. Two occurrences in the same request give two different values.
POST {{baseUrl}}/users
X-Request-Id: {{$guid}}
{"email": "{{$randomEmail}}", "age": {{$randomInt}}}
- Names are case-sensitive. The list below is complete. The single source is the
KNOWN_NAMEStable incrates/vars/src/dynamic.rs. - An unknown
$name is reported as unresolved and stays literal in the text. - Random values come from the
fastrandgenerator, which is not cryptographic. Never use them as real secrets. - Word lists (names, cities, lorem words) are small lists written for this project, so values repeat often.
- See Variables for scopes and precedence.
Common
| Name | Value |
|---|---|
$guid | A random UUID v4, 36 characters, for example 3f2b8c1e-.... |
$randomUUID | The same generator as $guid. |
$timestamp | Current Unix time in whole seconds. |
$isoTimestamp | Current UTC time as ISO 8601 with a fixed .000 millisecond part, for example 2026-10-19T08:10:36.000Z. |
Numbers and text
| Name | Value |
|---|---|
$randomInt | An integer from 0 to 1000 inclusive. |
$randomAlphaNumeric | One lowercase letter or digit. |
$randomBoolean | true or false. |
$randomHexColor | # followed by the lowercase hexadecimal of a random number below 0x1000000 (at least two digits, not zero-padded to six). |
$randomColor | A CSS colour name such as coral or crimson. |
$randomPrice | A decimal from 0.00 to 1000.00 with two decimals. |
$randomSemver | major.minor.patch, with major 0 to 9, minor 0 to 19, patch 0 to 29. |
Internet
| Name | Value |
|---|---|
$randomIP | Four octets, each 0 to 255. |
$randomIPV6 | Eight groups of four lowercase hex digits joined by : (no :: compression). |
$randomMACAddress | Six uppercase hex pairs joined by :. |
$randomPassword | 15 lowercase letters and digits. |
$randomUserAgent | One of four fixed user-agent strings. |
$randomProtocol | http or https. |
$randomDomainName | word.suffix, for example river.dev. |
$randomDomainSuffix | One of com, net, org, io, dev. |
$randomDomainWord | One word from the project word list. |
$randomUrl | https://www.example.<suffix>/<word>. |
$randomEmail | firstname.N@example<suffix> with N from 0 to 999. The suffix is appended with no dot, so one result looks like jane.42@examplecom. |
$randomExampleEmail | firstname.N@gmail.com (N from 0 to 999). |
$randomUserName | firstname_N in lowercase (N from 1 to 9999). |
People and places
| Name | Value |
|---|---|
$randomFirstName | A first name from the word list. |
$randomLastName | A last name from the word list. |
$randomFullName | First name, space, last name. |
$randomNamePrefix | One of Mr., Ms., Mrs., Dr.. |
$randomNameSuffix | One of PhD, Jr, III, MD. |
$randomPhoneNumber | +1-555-NNNN-NNNN, with four digits in each group. |
$randomCity | A city from the word list. |
$randomStreetName | A street name such as Alder Street. |
$randomStreetAddress | A number from 1 to 9998 followed by a street name. |
$randomCountry | A country name from the word list. |
$randomCountryCode | The two-letter code of a country from the same list. |
$randomLatitude | A decimal from -90 to 90 with six decimals. |
$randomLongitude | A decimal from -180 to 180 with six decimals. |
$randomJobTitle | A job title from the word list. |
$randomCompanyName | A prefix (such as Nova, Aster), a space, a word and a tail (Labs, Systems, Group, Works, Studio, IO) with no space before the tail. |
The country, currency and name lists are independent. $randomCountry and $randomCountryCode are two separate draws, so they may not describe the same country.
Dates
| Name | Value |
|---|---|
$randomDateFuture | ISO 8601 UTC time between 60 seconds and one year after now. |
$randomDatePast | ISO 8601 UTC time between 60 seconds and one year before now. |
$randomDateRecent | ISO 8601 UTC time between 5 seconds and one hour before now. |
$randomWeekday | Sunday to Saturday. |
$randomMonth | January to December. |
Finance
| Name | Value |
|---|---|
$randomCurrencyCode | A currency code such as EUR, USD, JPY. |
$randomCurrencyName | A currency name such as Euro, US Dollar. |
$randomCurrencySymbol | A currency symbol such as €, $, kr. |
$randomBankAccount | Nine random digits. |
$randomBitcoin | An amount with eight decimals followed by BTC. |
The three currency names are independent draws, like the country ones.
Text
| Name | Value |
|---|---|
$randomWord | One word from the project word list. |
$randomWords | 2 to 6 lorem words separated by spaces. |
$randomPhrase | 2 to 5 lorem words separated by spaces. |
$randomLoremWord | One lorem word. |
$randomLoremWords | 2 to 6 lorem words separated by spaces. |
$randomLoremSentence | 5 to 12 lorem words, capitalised, ending in a period. |
$randomLoremSentences | 2 to 5 sentences joined by spaces. |
$randomLoremParagraph | 3 to 7 sentences joined by spaces. |
$randomLoremParagraphs | 2 to 4 paragraphs separated by a blank line. |
$randomLoremText | The same generator as $randomLoremParagraph. |
$randomLoremSlug | 2 or 3 lorem words joined by -. |
Files
| Name | Value |
|---|---|
$randomFileName | word.ext, for example river.json. |
$randomFileExt | One of txt, json, png, jpg, pdf, mp3, zip, csv, md, svg. |
$randomFileType | One of plain-text, json, image, binary, archive, audio, video, document, spreadsheet, vector. |
$randomMimeType | A MIME type such as application/json, text/plain, image/png. |
$randomFilePath | /home/user/<word>/<word>.<ext>. |
pg.setVar. Runtime variables live for the session. See the scripting API.Scripting API
Reference for the script globals (pm, pg, bru, req, res, test, expect), the assertion library, the Node-style shims and the sandbox limits.
UI control channel
The opt-in local HTTP channel that lets postguy-cli inspect and drive the running desktop app: launch, control file, endpoints, set keys, command ids and limits.