Skip to content

kazunoko generate GENERATOR

Generate detection events without a physical detector.

Useful for testing data pipelines, validating processing scripts, and development without hardware.


Basic Usage

# Generate 10 random events (default)
kazunoko generate random

# Generate N random events
kazunoko generate random --count 100

# Replay events from a JSONL file
kazunoko generate data.jsonl

Generator Modes

Mode Argument Description
Random random Generate synthetic detection events
File <path> Replay events from a JSONL file

CLI Options

Option Short Default Description
--count -c 10 Number of events to generate
--speed -s 1.0 Event generation speed (0.01x–100x)
--jitter -j 0.0 Random timing variation in seconds
--seed (none) Random seed for reproducible generation
--verbose -v off Show generation progress

Usage Examples

Save to a file

kazunoko generate random --count 1000 > events.jsonl

Reproducible generation with a seed

Same seed always produces the same event sequence:

kazunoko generate random --count 100 --seed 42 > events.jsonl

Replay recorded events

kazunoko generate measurement.jsonl

Limit to first N events from the file:

kazunoko generate measurement.jsonl --count 50

Adjust playback speed

# 2x speed
kazunoko generate data.jsonl --speed 2.0

# Half speed with timing jitter
kazunoko generate data.jsonl --speed 0.5 --jitter 0.05

Pipe to a monitor script

kazunoko generate random --count 1000 > /tmp/events.jsonl &
uv run examples/monitor_events.py /tmp/events.jsonl

Compress output on the fly

kazunoko generate random --count 50000 | gzip > events.jsonl.gz

generate vs --mock

generate --mock
Usage Standalone command, pipes to files or other tools Flag on read / measure / query
Output JSONL stream to stdout Simulates device responses in-process
Use case Feed monitor scripts or test pipelines Test CLI commands without hardware