Skip to content

CLI Commands

Ahmed edited this page Mar 16, 2026 · 1 revision

Command Line Interface (CLI)

EventLens includes a powerful CLI for interacting with your event store from the terminal.

Run Commands via Gradle

You can execute CLI tasks using the Gradle wrapper:

./gradlew :eventlens-cli:run --args="[command] [options]"

Available Commands

1. serve

Starts the EventLens API and UI server.

./gradlew :eventlens-cli:run --args="serve --port 9090"

2. bisect

Performs a high-speed search across events using specific filters.

./gradlew :eventlens-cli:run --args="bisect --type ORDER_CREATED --after 2026-03-01"

3. export

Exports a stream of events to a local file (e.g., JSON or CSV) for offline processing.

./gradlew :eventlens-cli:run --args="export --aggregate-id 123 --output events.json"

4. replay

Manually triggers a state reconstruction for an aggregate and prints the resulting JSON to the console.

./gradlew :eventlens-cli:run --args="replay --aggregate-id 123"

5. diff

Compares the state of an aggregate between two specific event IDs or timestamps.

Return Home

Clone this wiki locally