@yo-protocol/cli
v1.0.4
Published
Interactive CLI for Yo Protocol — explore vaults, positions, rewards & more
Downloads
471
Readme
@yo-protocol/cli
Interactive CLI for Yo Protocol — explore vaults, positions, rewards & more from your terminal.
Installation
npm install -g @yo-protocol/cliOr run directly with npx:
npx @yo-protocol/cliQuick Start
Run yo with no arguments to launch interactive mode — a guided menu to browse vaults, check positions, view rewards, and build transactions:
yoOr use commands directly:
yo vaults # List all vaults with APY & TVL
yo vault yoUSD # Detailed info for a vault
yo portfolio --user 0x... # All positions across all chains
yo rewards --user 0x... # Claimable Merkl rewardsGlobal Options
| Flag | Description | Default |
| ----------------- | ----------------------------------------------- | ------- |
| --chain <id> | Chain ID: 1 (Ethereum), 8453 (Base), 42161 (Arbitrum) | 1 |
| --rpc-url <url> | Custom RPC endpoint (env: YO_RPC_URL) | — |
| --json | Force JSON output (for scripts & agents) | — |
| --raw | Treat amounts as raw bigint strings | — |
Commands
Vault Discovery
yo vaults # List all vaults with APY and TVL
yo vault <id> # Show detailed vault information
yo prices # Show current asset pricesUser Positions & Account
yo position <vault> --user <addr> # Show user position in a vault
yo portfolio --user <addr> # Show all positions across all chains
yo rewards --user <addr> # Show claimable Merkl rewards
yo user-perf <vault> --user <addr> # Show user P&L (realized & unrealized)
yo pending-redeems <vault> --user <addr> # Show pending redemptions
yo yo-rewards --user <addr> # $YO rewards earnedCharts & Analytics
yo yield <vault> # Vault yield history chart
yo tvl <vault> # Vault TVL history chart
yo share-price <vault> # Share price history chart
yo perf <vault> # Performance benchmark comparison
yo leaderboard # Top reward earners
yo history <vault> # Transaction history for a vault
yo history <vault> --user <addr> # Filter history by userTransaction Builder (Agent Compatible)
Build unsigned transaction calldata — useful for scripts, bots, and AI agents:
yo prepare deposit \
--vault yoUSD \
--amount 100
yo prepare redeem \
--vault yoUSD \
--shares 50
yo prepare approve \
--token 0x... \
--amount 1000 \
--decimals 6
yo prepare deposit-with-approval \
--vault yoUSD \
--token 0x... \
--owner 0x... \
--amount 100All prepare commands accept --slippage-bps <n> (default: 50 = 0.5%).
Schema
yo schema # Output full CLI schema as JSON (agent discovery)Interactive Mode
Running yo without a command opens the interactive menu:
- Browse Vaults — explore all vaults with APY & TVL
- My Account — grouped user actions:
- Portfolio — view positions across chains
- Rewards & Claims — check claimable Merkl rewards
- Performance (P&L) — realized & unrealized profit/loss
- Pending Redemptions — pending redeem requests
- $YO Rewards Earned — $YO token reward history
- Vault Deep Dive — detailed charts and analytics for a vault
- Leaderboard — top reward earners
- TX Builder — build deposit/redeem transactions step by step
JSON Output
Add --json to any command for machine-readable output:
yo vaults --json
yo vault yoUSD --json
yo position yoUSD --user 0x... --jsonEnvironment Variables
| Variable | Description |
| ------------ | ------------------ |
| YO_RPC_URL | Default RPC endpoint |
Related Packages
@yo-protocol/core— TypeScript SDK@yo-protocol/react— React hooks & components
License
MIT
