CLI Reference
The @oblivion/cli package provides a command-line interface for all protocol operations.
Setup
# Run via bun workspace
bun run cli -- <command>
# Or install globally
bun link --cwd packages/cli
oblivion <command>
Global Options
| Flag | Description | Default |
|---|---|---|
--rpc-url <url> | Solana RPC URL | RPC_URLS or SOLANA_RPC_URL env |
--keypair <path> | Path to keypair JSON | ./keypair.json or KEYPAIR env |
--commitment <level> | confirmed or finalized | confirmed |
--priority-fee <microlamports> | Priority fee override | auto |
--dry-run | Simulate only | false |
--json | JSON output format | false |
Commands
Protocol
oblivion protocol show # Show protocol config
oblivion protocol init # Initialize protocol
oblivion protocol pause # Pause protocol
oblivion protocol unpause # Unpause protocol
Vault
oblivion vault list # List all vaults
oblivion vault show <vault-id> # Show vault details
oblivion vault create # Create a new vault
oblivion vault pause <vault-id> # Pause vault
oblivion vault unpause <vault-id> # Unpause vault
oblivion vault update-allocation <id> # Queue allocation change
oblivion vault apply-allocation <id> # Validate pending allocation
Deposits
oblivion deposit register <vault-id> # Register deposit address
oblivion deposit process <vault-id> # Process pending deposit (keeper)
Withdraw
oblivion withdraw <vault-id> --shares <amount>
Reserve
oblivion reserve init # Create a global asset reserve
oblivion reserve show <address> # Show reserve state
oblivion reserve set-market <vault-id> # Map allocation to reserve
oblivion reserve init-position <vault-id> # Create vault reserve position
oblivion reserve sync <address> # Sync reserve assets
oblivion reserve refresh-valuations <id> # Oracle refresh
oblivion reserve move-liquidity <id> # Same-mint reserve transfer
Rebalance
oblivion rebalance trigger <vault-id> # Trigger rebalance
oblivion rebalance swap-begin <vault-id> # Begin cross-mint swap
oblivion rebalance swap-end <vault-id> # End cross-mint swap
DCA
oblivion dca create <vault-id> \
--schedule-id 1 \
--source-mint <mint> \
--amount 1000000 \
--interval 604800 \
--max-executions 10
oblivion dca execute <vault-id> \
--depositor <pubkey> \
--schedule-id 1 \
--reserve <pubkey> \
--oracle-primary <pubkey> \
--oracle-fallback <pubkey> \
--depositor-share <pubkey> \
--keeper-usdc <pubkey>
oblivion dca update <vault-id> --schedule-id 1 --amount 2000000
oblivion dca cancel <vault-id> --schedule-id 1
Fees
oblivion fees collect <vault-id> # Collect management fees
Points
oblivion points accrue <vault-id> --depositor <pubkey>
Yield
oblivion yield deposit <reserve> # Deploy to yield adapter
oblivion yield withdraw <reserve> # Withdraw from yield adapter
oblivion yield refresh <reserve> # Refresh adapter balance
Performance
oblivion performance show <vault-id> # Show performance metrics
oblivion performance refresh <vault-id> # Refresh performance snapshot