Skip to main content
Use thru-cli abi prep-for-publish when you need a publishable ABI YAML artifact before thru-cli abi account create or upgrade.

Use This When

  • you have local path imports that need to be inlined before publishing
  • you want to enforce that remaining imports are valid on-chain imports for one network
  • you need a stable artifact to review before pushing ABI contents on-chain
Choose another ABI command when:
  • you only need one flattened YAML file without publish rules: Flatten
  • you want to publish immediately: Account

Syntax

thru-cli abi prep-for-publish \
  --file <FILE> \
  --target-network <NETWORK> \
  --output <FILE> \
  [--include-dir <DIR>...] \
  [--verbose]

Publish Rules

RuleResult
Local path importsinlined into the output file.
On-chain imports on the target networkKept in the output file.
On-chain imports on another networkCommand fails.
git importsCommand fails.
http importsCommand fails.

Minimal Pattern

thru-cli abi prep-for-publish \
  --file ./program.abi.yaml \
  --include-dir ./abi \
  --target-network testnet \
  --output ./dist/program.publish.abi.yaml \
  --verbose

Notes

  • This command is the safest handoff point before abi account create because it strips out local-only packaging assumptions.
  • The thru-cli command uses --target-network. The standalone abi binary uses the same workflow with a shorter --network flag.
  • Verbose mode prints which local imports were inlined and how many packages were resolved.