defi is a CLI tool for interacting with 60+ DeFi protocols on HyperEVM.
All mutation operations default to --dry-run (safe). Use --broadcast to execute.
Send JSON commands via stdin for programmatic access:
echo '{"action":"status","params":{}}' | defi agent
echo '{"action":"dex.swap","params":{"protocol":"hyperswap-v3","token_in":"WHYPE","token_out":"USDC","amount":"1.0"}}' | defi agentstatus— Chain and protocol infolist_protocols— List protocols (optional:{"category":"dex"})schema— Get JSON schema for any action ({"action":"dex.swap"})
dex.swap— Build swap transaction- params:
protocol,token_in,token_out,amount,slippage_bps(optional, default 50),recipient(optional)
- params:
dex.quote— Get swap quote (requires RPC)
lending.supply— Supply asset to lending poollending.borrow— Borrow asset from lending poollending.repay— Repay borrowed assetlending.withdraw— Withdraw supplied asset- params:
protocol,asset,amount
- params:
staking.stake— Stake native tokenstaking.unstake— Request unstake- params:
protocol,amount
- params:
vault.deposit— Deposit into vaultvault.withdraw— Withdraw from vault- params:
protocol,amount
- params:
cdp.open— Open CDP position- params:
protocol,collateral,collateral_amount,debt_amount
- params:
# DEX swap (dry-run by default)
defi dex swap --protocol hyperswap-v3 --token-in WHYPE --token-out USDC --amount 1.0 --json
# Lending supply
defi lending supply --protocol hyperlend --asset USDC --amount 100.0 --json
# Staking
defi staking stake --protocol kinetiq --amount 10.0 --json
# Vault deposit
defi vault deposit --protocol veda --amount 100.0 --json
# Get schema
defi schema dex.swap --json
# Status
defi status --json--json— JSON output--ndjson— Newline-delimited JSON--fields field1,field2— Filter output fields
- All mutation operations default to
--dry-run - Use
--broadcastto actually send transactions - Dry-run returns the encoded calldata without sending
HyperSwap V3, HyperSwap V2, Project X, KittenSwap, NEST, Curve, Balancer V3, Ring Few, Ramses CL, Ramses HL, WOOFi, Valantis, Wombat, Hybra, Hyperliquid Spot
HyperLend, Morpho, Euler V2, HypurrFi, TermMax, Hyperdrive, HypurrFi Isolated, Teller
Kinetiq (kHYPE), stHYPE, Hyperbeat LST, Kintsu
Felix, Parallel
Hyperliquid Bridge, Hyperlane, SoDEX, Symbiosis
Pendle, Spectra, Penpie, Felix USDhl, Equilibria, Looped Hype, GrowiHF, Harmonix, HyperWave, Wrapped HLP
Beefy, Hyperbeat Earn, Kinetiq Earn, Lazy Summer
Veda, Upshift, Felix Vaults, D2 Finance
Hyperliquid HLP, Derive V2, Kinetiq Markets
Rysk V12, Hypersurface