Docs menu
Build a scenario
Scenario file Generators vars and const Time and pace Defaults Relationships Schedules Instances Lifecycle Collections Connections Delivery behaviorGetting started
Quickstart
Goal: print three JSON events on your machine in a few minutes.
1. Install and set a license
Follow Install if you have not already — get the CLI or Docker image, then set your license.
2. A tiny scenario
Create a folder for this quickstart, then save this file there as hello-world.yaml:
generators:
- name: events
config:
interval: 1s
value:
eventId: =uuid()
source: =oneOf(web, mobile, api)
score: =float(0, 100, round=1)
createdAt: =now(format=RFC3339Milli)
No connection yet — this file only describes the events. Values beginning with = are expressions that Synthtraffic calculates for each event. interval: 1s moves createdAt forward by one second each time.
If you are using Docker, also copy your downloaded license.env into the same folder as hello-world.yaml. The Docker command below expects both files in your current folder.
The command below also asks sample for at most three events across the whole file.
3. Sample
sample requires the license configured in step 1. Pick CLI or Docker; the sample command prints preview events to your terminal.
Run the sample
Requires Install and License from step 1 (binary on
PATH, SYNTHTRAFFIC_LICENSE_FILE set).
synthtraffic sample hello-world.yaml --events 3 --seed 42 Run the sample
Requires Install and License from step 1 (image pulled,
license.env in this folder, --env-file on every run).
MSYS_NO_PATHCONV=1 docker run --rm \
--env-file ./license.env \
--volume "${PWD}/hello-world.yaml:/work/hello-world.yaml:ro" \
synthtraffic/synthtraffic:latest \
sample /work/hello-world.yaml --events 3 --seed 42 --rmRemoves the stopped container after the sample finishes.
MSYS_NO_PATHCONV=1Prevents Git Bash on Windows from rewriting the Docker mount path.
--env-filePasses license variables from license.env in the current folder into the container.
--volumeMounts hello-world.yaml inside the container as a read-only file.
sample ...Prints three preview events to stdout.
4. Example output
JSON Lines — one object per event. The timestamps will differ each time you run it. With --seed 42, random choices such as uuid(), oneOf(...), and float(...) repeat:
{"eventId":"a3e390d7-1f37-4053-88fb-d0a3c4728058","source":"mobile","score":95.7,"createdAt":"2026-01-02T03:04:05.000Z"}
{"eventId":"04c54733-c8e5-4a14-9f04-bd9c4607f04e","source":"mobile","score":53.5,"createdAt":"2026-01-02T03:04:06.000Z"}
{"eventId":"c47f2c8d-22e7-4a1d-b034-2479e6bb38ef","source":"web","score":81.0,"createdAt":"2026-01-02T03:04:07.000Z"}
Next
You have a working preview. Choose one path:
- Overview — from event shape to connections, with Try it beside the YAML
- Scenario file — start the authoring path, one section at a time