Skip to content

Projection inspection with Cratis CLI

A projection is a declarative read-model builder driven by events. It defines how event data maps onto a read model: which fields to set, how to handle collections, when to create or delete instances, and which event types to subscribe to. Chronicle evaluates projections as events arrive and keeps the resulting read models up to date.

Lists all projection definitions registered in the specified event store and namespace.

Terminal window
cratis chronicle projections list
Flag Description
-e, --event-store <NAME> Event store to inspect. Defaults to the active context’s event store, then default.
-n, --namespace <NAME> Accepted but has no effect: projection definitions belong to the event store, not a namespace.

Use --output plain when you need to enumerate projections by name. The JSON format includes the full projection definition blob for each entry, which is significantly larger than the plain output. Use JSON only when you need the complete definition.

Terminal window
cratis chronicle projections list --output plain

List all projections:

Terminal window
cratis chronicle projections list

List in a specific event store:

Terminal window
cratis chronicle projections list -e myapp

Get projection identifiers for scripting:

Terminal window
cratis chronicle projections list -q

Shows the full projection declaration for a single projection, including all event mappings, child projections, and filters.

Terminal window
cratis chronicle projections show <IDENTIFIER>
Argument Description
IDENTIFIER The projection identifier. Use projections list -q to retrieve identifiers.
Flag Description
-e, --event-store <NAME> Event store to inspect. Defaults to the active context’s event store, then default.
-n, --namespace <NAME> Namespace to inspect. Defaults to the active context’s namespace, then Default.

Show a projection definition:

Terminal window
cratis chronicle projections show my-projection-id

Get the full definition as JSON:

Terminal window
cratis chronicle projections show my-projection-id -o json