CCIP CLI
Command-line interface for querying, sending, and managing cross-chain messages on the Chainlink Cross-Chain Interoperability Protocol.
Package
@chainlink/ccip-cliVersion0.96.0
Node.jsv20+ (v23+ recommended)
LicenseMIT
Installation
- npm (global)
- From source
Bash
npm install -g @chainlink/ccip-cli
Bash
git clone https://github.com/smartcontractkit/ccip-tools-ts
cd ccip-tools-ts
npm install
./ccip-cli/ccip-cli --help
Quick Start
1. Get RPC Endpoints
You need RPC endpoints for the chains you want to query:
- EVM
- Solana
- Aptos
- QuickNode - Multi-chain support with free tier
- Alchemy - Enterprise-grade with free tier
- Chainlist.org - Free public RPCs for EVM networks
- Infura - Reliable EVM endpoints with free tier
- Nodereal - Aptos and EVM support with free tier
- QuickNode - Multi-chain support with free tier
- Alchemy - Enterprise-grade with free tier
- Helius - Popular Solana RPC with generous free tier
- Solana Official - Free but rate-limited official endpoints
- QuickNode - Multi-chain support with free tier
- Aptos Labs - Official Aptos endpoints
- Nodereal - Aptos and EVM support with free tier
2. Set Up Your Environment
Create a .env file with your RPC endpoints:
Bash
.env
# Testnets (for learning/testing)
RPC_SEPOLIA=https://ethereum-sepolia-rpc.publicnode.com
RPC_ARB_SEPOLIA=https://arbitrum-sepolia-rpc.publicnode.com
RPC_FUJI=https://avalanche-fuji-c-chain-rpc.publicnode.com
# Optional: Add wallet for send commands
USER_KEY=0xYourPrivateKeyHere
3. Track an Existing Message
Find any CCIP transaction on a block explorer and track it:
Bash
ccip-cli show 0x0bc402c594a3721e4eb2d2b6c561490ebb5d53e2f6e18a6e2a8f2b1d3c4e5f60
The CLI shows the message lifecycle: Lane → Request → Commit → Execution.
4. Check a Transfer Fee (No Wallet Needed)
Before sending, check how much the transfer will cost:
Bash
ccip-cli send \
-s ethereum-testnet-sepolia \
-d ethereum-testnet-sepolia-arbitrum-1 \
-r 0x0BF3dE8c5D3e8A2B34D2BEeB17ABfCeBaf363A59 \
--to 0xYourReceiverAddress \
--only-get-fee
Sample output:
Fee: 0.001234567890123456 ETH (native)
5. Send Your First Message
Once you have a wallet configured, send a test message:
Bash
ccip-cli send \
-s ethereum-testnet-sepolia \
-d ethereum-testnet-sepolia-arbitrum-1 \
-r 0x0BF3dE8c5D3e8A2B34D2BEeB17ABfCeBaf363A59 \
--to 0xYourReceiverAddress \
--data "Hello from CLI!"
Then track it with the returned transaction hash:
Bash
ccip-cli show <tx-hash-from-send>
Quick Reference
| Task | Command | Documentation |
|---|---|---|
| Track a message | ccip-cli show <tx-hash> | show |
| Send a message | ccip-cli send -s <source> -d <dest> -r <router> | send |
| Execute pending message | ccip-cli manualExec <tx-hash> | manualExec |
| Decode error data | ccip-cli parse <data> | parse |
| List supported tokens | ccip-cli getSupportedTokens -n <network> -a <addr> | getSupportedTokens |
| Query lane latency | ccip-cli laneLatency <source> <dest> | laneLatency |
Each command page includes full argument and option reference, practical examples, and cross-references to related commands.
Common Issues
| Error | Solution |
|---|---|
No RPC configured for chain X | Add an RPC endpoint for that chain via --rpcs or RPC_* env var |
Transaction not found | Verify the tx hash and ensure you have RPCs for the source chain |
timeout | The RPC may be slow or rate-limited. Try a different provider. |
insufficient funds | Ensure your wallet has enough native tokens for gas + CCIP fee |
See Troubleshooting for more solutions.
Next Steps
- Configuration - Set up RPC endpoints and wallets
- Debugging Failed Messages - Track, debug, and manually execute
- Token Transfer Workflow - Send tokens cross-chain