CLI filter that emits lines from stdin or file with optional delay, enabling controlled flow through data processing pipelines.
Why popstr?
Sometimes you need to control the rate at which data flows through a pipeline. Whether you're rate-limiting API requests, replaying logs at a realistic pace, or testing how your system handles steady input streams, popstr gives you precise control over line-by-line output timing.
Memory Efficient
Streams line-by-line, handling arbitrarily large files without loading them into memory.
Unix Philosophy
Works as a filter in pipelines. Reads from stdin or files, writes to stdout. Composes naturally with other tools.
Flexible Timing
Add consistent delays, random jitter, or batch multiple lines together. Fine-tune output timing to match your needs.
Install
On macOS with Homebrew:
brew tap uradical/tap
brew install popstr
Or install with Go:
go install uradical.io/go/popstr@latest
Usage
Flags
-d, --delayInterval between line outputs (default: 0s)-n, --batchLines to emit simultaneously (default: 1)-j, --jitterRandom variation range on delay (default: 0s)-h, --helpShow helpExamples
Rate-limit API requests
Send one request per second:
Batch processing
Emit 10 lines every 5 seconds:
Randomised delays
Add jitter to avoid thundering herd:
Log replay
Replay production logs at a controlled pace:
From clipboard
Process clipboard contents line by line: