Skip to main content
Use thru-cli abi flatten when you want one self-contained ABI YAML file for review, diffing, or downstream tooling.

Use This When

  • you want to remove the need for separate local include directories
  • you need a single-file ABI artifact before another tooling step
  • you want a reviewable snapshot of a multi-file ABI package
Choose another ABI command when:
  • you want an on-chain publishing artifact that enforces network rules: Prep for Publish
  • you want a JSON dependency manifest instead of YAML: Bundle

Syntax

thru-cli abi flatten \
  --file <FILE> \
  --output <FILE> \
  [--include-dir <DIR>...] \
  [--verbose]

What It Does

  • loads the root ABI file
  • resolves imports using the supplied include directories
  • writes one flattened YAML file to --output

Minimal Pattern

thru-cli abi flatten \
  --file ./program.abi.yaml \
  --include-dir ./abi \
  --output ./dist/program.flat.abi.yaml \
  --verbose

Notes

  • flatten is local-file oriented. It does not publish anything on-chain.
  • --verbose is useful when you want to confirm which include directories were actually used.
  • If the next step is publishing, move to Prep for Publish instead of stopping at a flattened file.