defi-cli is an agent-first DeFi retrieval CLI with a stable automation contract:
- Stable JSON envelope + deterministic field naming
- Stable exit codes
- Canonical chain and asset IDs (CAIP-2 / CAIP-19)
- Canonical amount handling (base units + decimal normalization)
Start here
- New user: Installation -> Quickstart
- Building automation: Output Contract -> Agent Overview
- Need exact command flags: Command Reference
- Need provider/key rules: Providers and Auth
Example
Key-gated routes
Most commands are keyless. Key requirements are driven by upstream providers, not by CLI licensing/auth.| Route | Env var |
|---|---|
swap quote --provider 1inch | DEFI_1INCH_API_KEY |
swap quote --provider uniswap | DEFI_UNISWAP_API_KEY |
swap quote --provider jupiter | DEFI_JUPITER_API_KEY (optional for higher limits) |
chains assets | DEFI_DEFILLAMA_API_KEY |
bridge list | DEFI_DEFILLAMA_API_KEY |
bridge details | DEFI_DEFILLAMA_API_KEY |
DEFI_BUNGEE_API_KEY and DEFI_BUNGEE_AFFILIATE.
Lending and yield routing
lend markets, lend rates, and yield opportunities use direct protocol adapters:
aavemorphokamino(Solana mainnet)

