Skip to main content
defi-cli is an agent-first DeFi CLI for querying and acting on-chain, 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

Example

defi providers list --results-only
[
  {
    "name": "aave",
    "type": "lending+yield",
    "requires_key": false,
    "capabilities": ["lend.markets", "lend.rates", "lend.positions", "yield.opportunities", "yield.positions", "yield.history", "lend.plan", "lend.execute", "yield.plan", "yield.execute", "rewards.plan", "rewards.execute"]
  },
  {
    "name": "taikoswap",
    "type": "swap",
    "requires_key": false,
    "capabilities": ["swap.quote", "swap.plan", "swap.execute"]
  },
  {
    "name": "across",
    "type": "bridge",
    "requires_key": false,
    "capabilities": ["bridge.quote", "bridge.plan", "bridge.execute"]
  }
]

Key-gated routes

Most commands are keyless. Key requirements are driven by upstream providers, not by CLI licensing/auth.
RouteEnv var
swap quote --provider 1inchDEFI_1INCH_API_KEY
swap quote --provider uniswapDEFI_UNISWAP_API_KEY
swap quote --provider jupiterDEFI_JUPITER_API_KEY (optional for higher limits)
chains assetsDEFI_DEFILLAMA_API_KEY
bridge listDEFI_DEFILLAMA_API_KEY
bridge detailsDEFI_DEFILLAMA_API_KEY
Bungee quotes are keyless by default. Dedicated backend mode requires both DEFI_BUNGEE_API_KEY and DEFI_BUNGEE_AFFILIATE.

Lending and yield routing

lend markets, lend rates, yield opportunities, and yield history use direct protocol adapters:
  • aave (read + execution)
  • morpho (read + execution)
  • moonwell (Base, Optimism; read + execution)
  • kamino (Solana mainnet, read only)
Execution commands (plan, run, submit, status) are available for swap, bridge, lend, yield, rewards, approvals, and transfer workflows. See Commands Overview.

Next