Skip to content

Event Types

An event type is a registered schema that describes the shape of a domain event stored in Chronicle. Each event type has a name, a generation number, and a JSON Schema definition. Generations allow schemas to evolve over time while preserving older events.

Lists all registered event types in the specified event store and namespace.

Terminal window
cratis chronicle event-types list
FlagDescription
-e, --event-store <NAME>Event store to inspect. Defaults to default.
-n, --namespace <NAME>Namespace to inspect. Defaults to Default.

Use --output plain when scanning for event type names. The JSON format includes the full JSON Schema definition for every event type, which can be up to 34 times larger than the plain output. Reserve JSON for when you need schema details.

Terminal window
cratis chronicle event-types list --output plain

List all event types in the default event store:

Terminal window
cratis chronicle event-types list

List event types in a specific event store and namespace:

Terminal window
cratis chronicle event-types list -e myapp -n tenant-a

Get only the identifiers for scripting:

Terminal window
cratis chronicle event-types list -q

Shows the full JSON Schema definition for a single event type.

Terminal window
cratis chronicle event-types show <EVENT_TYPE>
ArgumentDescription
EVENT_TYPEEvent type identifier. Use the type name alone (e.g. UserRegistered) to get the latest generation, or append +<generation> (e.g. UserRegistered+1) to get a specific generation.
FlagDescription
-e, --event-store <NAME>Event store to inspect. Defaults to default.
-n, --namespace <NAME>Namespace to inspect. Defaults to Default.

Show the latest schema for an event type:

Terminal window
cratis chronicle event-types show UserRegistered

Show a specific generation:

Terminal window
cratis chronicle event-types show UserRegistered+1

Get machine-readable JSON output:

Terminal window
cratis chronicle event-types show UserRegistered -o json