Back to Terragrunt

Catalog Format

docs/src/data/experiments/catalog-format.mdx

1.1.32.0 KB
Original Source

Non-interactive output formats for the catalog command.

catalog-format - What it does

The catalog command renders an interactive terminal user interface, which leaves scripts, CI jobs, and agents with no way to read what it discovers. This experiment adds a --format flag that writes results to standard output instead: jsonl emits one JSON object per catalog entry, and md emits a Markdown document.

Both formats render progressively, as entries are discovered, so a consumer that only needs the first few can stop reading before discovery finishes. Entries appear in discovery order, which is not stable between runs.

The jsonl records follow a published JSON schema, so consumers can validate what they read.

Interactivity stays in the terminal user interface. Scaffolding a module and copying a unit or stack are not available in the non-interactive formats, which report the command to run instead.

catalog-format - How to provide feedback

Track and discuss this experiment in gruntwork-io/terragrunt#6579. When reporting issues or providing feedback, please include:

  • How you consume catalog output (shell script, CI job, agent tooling).
  • The format you are using, and any entry fields you need that are missing.
  • Whether you depend on reading output before the command exits.

catalog-format - Criteria for stabilization

To transition the catalog-format feature to a stable release, the following must be addressed, at a minimum:

  • A --format flag on catalog accepting jsonl and md.
  • Progressive rendering of both formats, so output is usable before discovery completes.
  • A published JSON schema for jsonl records.
  • A default format derived from what the output stream supports, so piping catalog does not require passing --format.
  • Documentation covering each format and the stability guarantees of the record structure.
  • Integration test coverage for each format.
  • Community feedback on real-world usage.