Skip to content

Output Formats

The cratis CLI supports four output formats controlled by the -o / --output flag. Choosing the right format for your context dramatically reduces token consumption and improves scripting reliability.

Rich terminal output with borders, column alignment, and ANSI colors. This is the default when running interactively in a terminal.

Terminal window
cratis chronicle event-types list -o table

Use table when you are reading output yourself and want it to be easy to scan. Do not use it in scripts or AI prompts — it produces the most tokens of any format.


Tab-separated rows with no borders, no color, and no decoration. Column headers appear on the first row.

Terminal window
cratis chronicle event-types list -o plain

Use plain when:

  • Piping output to awk, grep, cut, or similar tools.
  • Writing shell scripts that parse individual fields.
  • Sending output to an AI assistant where token count matters but you do not need structured data.

plain is roughly 34 times smaller than json for event-types list output, 25 times smaller for events, and 27 times smaller for read-models list output. These are significant savings when working with large event stores.


Pretty-printed JSON with indentation and newlines.

Terminal window
cratis chronicle event-types list -o json

Use json when:

  • You need structured, machine-readable data.
  • You are writing a tool that calls cratis as a subprocess and parses its output with a JSON library.
  • Human readability of the JSON matters (for debugging, for example).

Compact JSON with no extra whitespace. This is the default in AI assistant environments (Claude Code, Cursor, Windsurf).

Terminal window
cratis chronicle event-types list -o json-compact

Use json-compact when:

  • You need structured data in an AI prompt or context window.
  • You are piping JSON to another tool that does not care about formatting.
  • You want to minimize token usage while still having parseable structure.

json-compact is smaller than json and produces structured data, making it the best choice when an AI tool needs to interpret results.


The -q / --quiet flag outputs only the primary identifier of each result, one per line, with no headers and no decoration. It is even more compact than plain and is designed specifically for piping identifiers into other commands.

Terminal window
cratis chronicle observers list -q

Piping example — replay all observers:

Terminal window
cratis chronicle observers list -q | xargs -I {} cratis chronicle observers replay {} -y

This pattern works for any command that accepts an identifier argument. Use --quiet on the listing command to produce clean input for the action command.


SituationRecommended format
Reading output in a terminaltable (default)
Shell scripting and parsingplain
Structured data with human readabilityjson
AI assistants and token-sensitive contextsjson-compact (default in AI environments)
Piping identifiers to another command--quiet