Skip to main content
Version: 1.3.1

search

Supported chain families:
EVM iconEVMSolana iconSolanaAptos iconAptos

Search CCIP messages via the API with filters for sender, receiver, source/destination chains, and manual execution eligibility.

Synopsis

Bash
ccip-cli search messages [sender] [options]

Aliases: msgs

Description

The search command queries the CCIP API to find cross-chain messages matching the provided filters. Results are paginated automatically — the CLI fetches pages until the --limit is reached or all matching messages are returned.

In interactive terminals (TTY), after displaying results the CLI presents a menu to select and inspect individual messages in detail.

This command requires API access. It fails if --no-api is set.

Arguments

ArgumentTypeRequiredDescription
[sender]stringNoFilter by sender address. Same as --sender.

Options

OptionAliasTypeDefaultDescription
--senderstring-Filter by sender address
--receiverstring-Filter by receiver address
--source-sstring-Source chain (name, chainId, or selector)
--dest-dstring-Destination chain (name, chainId, or selector)
--manual-exec-onlybooleanfalseOnly return messages ready for manual execution
--limitnumber20Max results to return. 0 = unlimited.

See Configuration for global options (--format, --api, etc.).

Examples

Search by sender address

Bash
ccip-cli search messages 0x9d087fC03ae39b088326b67fA3C788236645b717

Or equivalently:

Bash
ccip-cli search messages --sender 0x9d087fC03ae39b088326b67fA3C788236645b717

Filter by source and destination chain

Bash
ccip-cli search messages --source ethereum-mainnet --dest arbitrum-mainnet

Chain identifiers accept names (ethereum-mainnet), chain IDs (1), or chain selectors (5009297550715157269).

Find messages ready for manual execution

Bash
ccip-cli search messages --manual-exec-only

Combine with other filters to narrow the results:

Bash
ccip-cli search messages --sender 0x9d08... --manual-exec-only --limit 5

Retrieve all matching messages

Bash
ccip-cli search messages --sender 0x9d08... --limit 0

Setting --limit 0 removes the cap and fetches all pages. For large result sets (1,000+), the CLI prints a progress warning.

Output as JSON for scripting

Bash
ccip-cli search messages --sender 0x9d08... --format json

JSON output skips the interactive menu and writes directly to stdout, making it suitable for piping:

Bash
ccip-cli search messages --sender 0x9d08... --format json | jq '.[].messageId'

Use a custom API endpoint

Bash
ccip-cli search messages --sender 0x9d08... --api https://staging-api.example.com

Output

Table format (default)

Each result is displayed as a table row with:

FieldDescription
messageIdThe CCIP message ID
statusMessage status (e.g., SUCCESS, FAILED)
sourceSource network name and chain ID
destDestination network name and chain ID
senderSender address
receiverReceiver address
txHashSource transaction hash
timestampSend timestamp

After displaying results, an interactive selection menu appears (TTY only) allowing you to pick a message and view its full details — equivalent to running ccip-cli show on that message.

JSON format

With --format json, results are written as a JSON array to stdout. No interactive menu is shown.

Log format

With --format log, each result is printed as a raw JavaScript object. The interactive menu is still available in TTY mode.

Behavior

  1. Validates that API access is enabled (fails with an error if --no-api is set)
  2. Resolves --source and --dest to chain selectors via networkInfo()
  3. Paginates through the API using searchAllMessages until --limit is reached
  4. Displays results in the requested format
  5. In TTY mode (except JSON format), presents an interactive menu to inspect individual messages via getMessageById

See Also

  • show — Display full details of a CCIP message
  • manual-exec — Execute a pending or failed message
  • Configuration — API, RPC, and output format options

Exit Codes

CodeMeaning
0Success — results returned (or no matches found with warning)
1Error (API unavailable, network failure, invalid arguments)