thru-cli abi analyze when you need to understand how ABI types resolve before you generate code, publish an ABI, or debug a reflection failure.
Use This When
- you want to confirm imports and type resolution succeed
- you need the shared layout IR in JSON or protobuf form
- you want to preview generated footprint or validate helpers for one type
- you want generated source code: Codegen
- you want to decode real bytes: Reflect
- you want to prepare a file for publishing: Prep for Publish
Syntax
Important Flags
| Flag | Use it for | |
|---|---|---|
--print-ir | Print the shared layout IR after analysis. | |
| `—ir-format json | protobuf` | Choose JSON or hex-encoded protobuf output for the IR. Defaults to json. |
—print-footprint <TYPE> | Preview the generated legacy and IR footprint helpers for one type. | |
—print-validate <TYPE> | Preview the generated legacy and IR validate helpers for one type. |
What It Prints
Even without optional flags,analyze prints:
- loaded files and resolved packages
- discovered type definitions
- detailed type analysis from the resolved graph
Minimal Patterns
Notes
analyzeis a good first stop when codegen or reflection fails because it exercises the same import and type-resolution path.--print-iris the most useful flag when you need to compare multiple ABIs or inspect cross-language layout behavior.- If you only care whether an input file is ready for on-chain publishing, use Prep for Publish instead of loading the whole analysis output into context.