sincecutoff.com
← all changes

terragrunt catalog supports non-interactive JSONL and Markdown output

Introduced 2026-08-13 · score 0.96

HOW TO USE IT

When catalog results must be read without a terminal or saved for review, enable the `catalog-format` experiment and run `terragrunt catalog --experiment=catalog-format --format=jsonl` for JSON Lines or `--format=md` for Markdown; use `jq` to project or remove JSONL fields and check Markdown’s closing table and count for completeness.

terragrunt catalog --experiment=catalog-format --format=jsonl | jq -c '{kind, title, component_source}'
terragrunt catalog --experiment=catalog-format --format=jsonl | jq -c 'del(.doc)'
terragrunt catalog --experiment=catalog-format --format=md > catalog.md

WHY THIS HELPS

When inspecting catalog results without a terminal or saving them for review, enable `catalog-format` and select JSON Lines for processing or Markdown for reading.

BEFORE THIS CHANGE

The catalog command used a terminal UI and required a terminal; it could not be read in a non-terminal environment.

REQUIREMENTS AND LIMITATIONS

  • Version: v1.1.3
  • Availability: Experiment
  • --experiment=catalog-format (required): Enables the experiment gating `--format` in v1.1.3. It can also be enabled with `TG_EXPERIMENT=catalog-format`.
  • --format=jsonl (required): Writes one JSON object per catalog entry to standard output.
  • --format=md (required): Writes one Markdown document with a section per entry; the final table and discovered count indicate completeness.
  • jq projection `{kind, title, component_source}`: Selects those fields from each JSONL entry.
  • jq deletion `del(.doc)`: Drops the README body from each JSONL entry; `doc` can contain substantial data.
  • Prerequisite: Terragrunt `catalog` command available; `--format` requires the `catalog-format` experiment in v1.1.3.
  • Prerequisite: Install `jq` to run the documented JSONL filtering examples.
  • `--format=tui` remains the default and leaves the terminal user interface as it was.
  • JSONL emits one object per line in discovery order, which interleaves repositories and differs between runs.
  • Entries stream as discovered; a reader stopping early ends the JSONL command quietly.
  • Every JSONL entry includes the complete component README in the `doc` field.
  • Markdown entries stream as discovered; READMEs are fenced, and the closing table and count indicate what was discovered and whether the document was cut short.
  • Docs conflict: Current active-experiments documentation describes behavior after the experiment completed in v1.2.0: `--format` is available by default and piping `catalog` defaults to JSONL. That newer behavior does not apply to the v1.1.3 instructions.

FIRST-PARTY EVIDENCE

Check the installed version and the source before using it. Entry JSON

Report a problem with this card