Skip to main content

Output Modes

The CLI auto-detects your terminal and adjusts output format accordingly.

Pipe-Friendly Output

The CLI auto-detects non-TTY environments and switches to JSON:

Force JSON in Terminal

Disable Colour

Verbose Errors

Enable stack traces for debugging:

Exit Codes

End-to-End Workflow: Cross-Chain Swap

This example walks through a complete cross-chain USDC transfer from Ethereum to Base.

Step 1: Find Chain IDs

Step 2: Look Up Token Address

Step 3: Get Best Quote

The response includes a transactionRequest object ready for signing.

Step 4: Approve and Sign (External)

Use your wallet to:
  1. Approve the token spend if needed
  2. Sign and broadcast the transactionRequest from the quote

Step 5: Track Progress

The --watch flag polls until the transfer completes or fails.

Scripting Example

Combine commands in a shell script: