CLI reference

Every aero command and subcommand with its flags, defaults and one example, taken from the CLI source and its help output.

On this page

Common flags#

These flags appear on many commands. The tables further down list them again only where their meaning changes.

FlagRequiredDefaultMeaning
--chainno8453Chain id. Every Aerodrome and Velodrome command takes it.
--walletnoconnected walletAddress the plan or read is built for. Transaction commands need it when no wallet is connected. An address other than the connected wallet prints an unsigned plan instead of signing.
--yes, -ynooffSkip the "Sign and broadcast?" prompt. Browser and WalletConnect wallets still ask for approval.
--dry-runnooffPrint the unsigned plan and never sign.

Global flags work on every command.

FlagMeaning
--help, -hShow help for the command
--version, -vPrint the CLI version
--wizardAsk for each flag interactively, then run the command
--completionsPrint a completion script for bash, zsh, fish or sh
--log-levelMinimum log level, one of all, trace, debug, info, warn, warning, error, fatal or none

Transaction commands are swap, deposit, withdraw, stake, unstake, claim-emissions, claim-fees, create-venft, stocks buy, stocks sell and index rebalance. They take --chain, --wallet, --yes and --dry-run. How they sign is described in Transactions.

Reads#

Reads print JSON and never sign.

aero quote#

Quote a swap through the best route without building transactions.

FlagRequiredDefaultMeaning
--from-tokenyesnoneToken you pay with, symbol or 0x address. Asked for in a terminal when missing.
--to-tokenyesnoneToken you receive. Asked for in a terminal when missing.
--amountyesnoneAmount in raw units, or human units with --use-decimals
--use-decimalsnooffRead --amount as human units
--chainno8453Chain id

The result has both tokens, the input and output amounts in raw and decimal form, the price, USD prices when available, price_impact_pct and the route with each hop's pool.

aero quote --from-token ETH --to-token USDC --amount 0.1 --use-decimals

aero pools#

Browse liquidity pools.

FlagRequiredDefaultMeaning
--token0nononeOnly pools containing this token
--token1nononeOnly pools containing this token too
--pool-typenoallcl, stable or volatile
--fullnooffInclude symbol, tokens, reserves, TVL, fee, gauge and weekly emissions
--limitnoall poolsReturn at most this many pools, 1 to 100
--chainno8453Chain id

Without --full each entry has the pool address, type and token addresses only.

aero pools --token0 ETH --token1 USDC --full --limit 5

aero positions#

List liquidity positions, basic and concentrated.

FlagRequiredDefaultMeaning
--ownernoconnected walletList positions for another address
--walletnoconnected walletSame as --owner when --owner is absent
--chainno8453Chain id

Fails with "positions requires wallet or owner" when no wallet is connected and neither flag is set. Each entry has the position id, pool, liquidity, staked amount, token amounts, earned fees and emissions, and the tick range.

aero positions --owner 0xOWNER

aero epochs-latest#

Latest voting epoch per pool, with votes, emissions, fees and incentives.

FlagRequiredDefaultMeaning
--pool-typenoallcl, stable or volatile
--chainno8453Chain id
aero epochs-latest --pool-type cl

aero epochs#

Voting epoch history for one pool.

FlagRequiredDefaultMeaning
--lpyesnonePool address
--pool-typenoallcl, stable or volatile
--limitno10Epochs to return, 1 to 100
--offsetno0Skip this many epochs
--chainno8453Chain id
aero epochs --lp 0xPOOL --limit 5

Transactions#

Every command here builds a plan with approvals first and the action last. Each also takes the common flags --chain, --wallet, --yes and --dry-run.

aero swap#

Swap tokens through the best route.

FlagRequiredDefaultMeaning
--from-tokenyesnoneToken you pay with. Asked for in a terminal when missing.
--to-tokenyesnoneToken you receive. Asked for in a terminal when missing.
--amountyesnoneAmount in raw units, or human units with --use-decimals
--slippageno0.01Tolerance from 0 to 1. 0.01 is 1%. SUGAR_SWAP_SLIPPAGE changes the default.
--use-decimalsnooffRead --amount as human units

An ERC-20 input adds a token approval to Permit2 and a Permit2 approval to the swapper when the current allowance is too low, each for the exact amount. A native ETH input needs none. For listed tokens, routes that quote more than twice the on-chain oracle's expected output are rejected. The summary shows both asset addresses, the minimum output and the price impact.

aero swap --from-token USDC --to-token AERO --amount 25 --use-decimals --dry-run

aero deposit#

Add liquidity to a pool, or create a pool from a token pair.

FlagRequiredDefaultMeaning
--poolone pool formnoneExisting pool address
--token0one pool formnoneFirst token of a new pool
--token1one pool formnoneSecond token of a new pool
--pool-typeone pool formnonecl, stable or volatile for a new pool
--tick-spacingnew CL poolnoneTick spacing of a new CL pool
--amount0nononeAmount of token0
--amount1nononeAmount of token1
--price-lowernononeCL range lower bound as a price
--price-uppernononeCL range upper bound as a price
--tick-lowernononeCL range lower bound as a tick
--tick-uppernononeCL range upper bound as a tick
--initial-pricenononeStarting price for an uninitialized CL pool
--slippageno0.01Tolerance from 0 to 1
--deadline-minutesno30Transaction deadline in minutes
--use-decimalsnooffRead amounts as human units

Use either --pool or the new-pool form with --token0, --token1 and --pool-type. Combining them fails. A new CL pool also needs --tick-spacing, and --tick-spacing is rejected for other types. On an existing basic pool, pass one amount and Aero quotes the other side. A new basic pool needs both amounts. CL range flags are rejected on basic pools.

aero deposit --pool 0xPOOL --amount0 100 --use-decimals --dry-run

aero withdraw#

Remove liquidity from a position, fully or in part.

FlagRequiredDefaultMeaning
--positionpool or positionnonePosition id from aero positions
--poolpool or positionnonePool of the position
--fractionnoeverythingShare to withdraw, above 0 and at most 1. 0.5 is half.
--burnnooffBurn the emptied CL position NFT
--no-collectnocollectSkip collecting owed fees while withdrawing (CL only)
--unwrap-nativenooffReturn the wrapped native leg as the native token
--slippageno0.01Tolerance from 0 to 1
--deadline-minutesno30Transaction deadline in minutes

A staked position must be unstaked first.

aero withdraw --position 123 --pool 0xPOOL --fraction 0.5 --dry-run

aero stake#

Stake a position in its gauge to earn emissions instead of trading fees.

FlagRequiredDefaultMeaning
--positionpool or positionnonePosition id
--poolpool or positionnonePool of the position

Staking a CL position approves the NFT to the gauge first.

aero stake --position 123 --pool 0xPOOL

aero unstake#

Take a position out of its gauge.

FlagRequiredDefaultMeaning
--positionpool or positionnonePosition id
--poolpool or positionnonePool of the position
--amountnoeverythingLP amount to unstake from a basic pool, in raw units
aero unstake --position 123 --pool 0xPOOL

aero claim-emissions#

Claim gauge emissions earned by a staked position.

FlagRequiredDefaultMeaning
--positionpool or positionnonePosition id
--poolpool or positionnonePool of the position
aero claim-emissions --position 123 --pool 0xPOOL

aero claim-fees#

Claim trading fees earned by an unstaked position.

FlagRequiredDefaultMeaning
--positionpool or positionnonePosition id
--poolpool or positionnonePool of the position
--burnnooffBurn the CL position NFT if it is empty
--unwrap-nativenooffReturn the wrapped native leg as the native token
aero claim-fees --position 123 --pool 0xPOOL --unwrap-native

aero create-venft#

Lock AERO on Base, or VELO on OP Mainnet, into a veNFT for voting power.

FlagRequiredDefaultMeaning
--amountyesnoneAmount to lock, raw units unless --use-decimals
--lock-duration-secondsyesnoneLock length in seconds, rounded down to whole weeks, at most 4 years. One year is 31536000.
--use-decimalsnooffRead --amount as human units

The plan includes the token approval.

aero create-venft --amount 100 --use-decimals --lock-duration-seconds 31536000

Stocks and indices#

All stock commands require Base. See Stocks and indices for how amounts and rebalancing work.

aero stocks list#

Tokenized stocks with an indicative USDC price and, with a wallet, your balances.

FlagRequiredDefaultMeaning
--walletnoconnected walletAddress whose balances to show
--chainno8453Must be 8453
aero stocks list

aero stocks buy#

Buy a tokenized stock with USDC.

FlagRequiredDefaultMeaning
--stockyesnoneNVDAc, AAPLc, GOOGLc, METAc, AMZNc, MSFTc, TSLAc, MSTRc, SNDKc or SPCXc
--amountyesnoneUSDC to spend
--slippageno0.01Tolerance, at least 0 and below 1
aero stocks buy --stock NVDAc --amount 25 --dry-run

aero stocks sell#

Sell tokenized stock units for USDC.

FlagRequiredDefaultMeaning
--stockyesnoneStock symbol, as for stocks buy
--amountyesnoneStock token units to sell
--slippageno0.01Tolerance, at least 0 and below 1
aero stocks sell --stock NVDAc --amount 0.1 --dry-run

aero index create#

Save a new index. Fails if the name exists.

FlagRequiredDefaultMeaning
--nameyesnoneIndex name
--allocationsyesnoneTarget percentages such as NVDAc=50,AAPLc=50. Use 0 to exit a stock.
aero index create --name tech --allocations 'NVDAc=50,AAPLc=50'

aero index update#

Replace the weights of a saved index.

FlagRequiredDefaultMeaning
--nameyesnoneExisting index name
--allocationsyesnoneNew target percentages
aero index update --name tech --allocations 'NVDAc=0,AAPLc=100'

aero index list#

List saved indices as JSON. No flags.

aero index list

aero index show#

Show one saved index.

FlagRequiredDefaultMeaning
--nameyesnoneIndex name
aero index show --name tech

aero index delete#

Delete saved weights. Wallet holdings are not touched.

FlagRequiredDefaultMeaning
--nameyesnoneIndex name
aero index delete --name tech

aero index rebalance#

Trade wallet holdings toward a saved index.

FlagRequiredDefaultMeaning
--nameyesnoneSaved index name
--cashno0USDC added on top of existing holdings
--slippageno0.01Tolerance, at least 0 and below 1
--walletnoconnected walletAddress to rebalance
--chainno8453Must be 8453
--yes, -ynooffSkip the prompt
--dry-runnooffPrint the unsigned plan
aero index rebalance --name tech --cash 100 --dry-run

Wallet#

See Wallets for how each wallet type signs and where it is stored.

aero wallet connect#

Pair a wallet over WalletConnect, or a browser extension with --browser.

FlagRequiredDefaultMeaning
--browsernooffConnect Rabby or another browser extension through a local page
--chainno8453Chain the wallet must approve
aero wallet connect --browser

aero wallet create#

Generate a local wallet. The recovery phrase is shown once, then sealed with your passphrase. No flags.

aero wallet create

aero wallet restore#

Import an existing recovery phrase into the local encrypted wallet. No flags.

aero wallet restore

aero wallet status#

Show the active wallet and where it comes from. No flags.

aero wallet status

aero wallet disconnect#

Disconnect the browser wallet and the WalletConnect session. A stored local wallet stays. No flags.

aero wallet disconnect

aero wallet remove#

Delete the local encrypted wallet after a confirmation. No flags.

aero wallet remove

Executions#

Plans Aero has started sending, saved in the execution journal. See Transactions.

aero executions list#

List saved executions with id, chain, sender, status and each step's state and hash. No flags.

aero executions list

aero executions resume#

Check receipts and send the remaining unsubmitted steps of a saved plan, without resending submitted ones. Asks for confirmation.

FlagRequiredDefaultMeaning
--idyesnoneExecution id from aero executions list
aero executions resume --id PLAN_ID

aero executions cancel#

Cancel the unsubmitted steps of an active execution. Asks for confirmation.

FlagRequiredDefaultMeaning
--idyesnoneExecution id
aero executions cancel --id PLAN_ID

ALM#

Self-hosted rebalancing of concentrated positions. See ALM before using --execute.

aero serve#

Watch configured CL positions and rebalance them. Dry-run unless --execute is passed.

FlagRequiredDefaultMeaning
--configno~/.config/sugar-ts/alm.jsonALM config file
--executenooffSign and broadcast with the local encrypted wallet
--oncenooffRun one pass and exit
--intervalnopollSeconds from the configPoll interval in seconds, at least 1
--allow-unsimulatednooffBroadcast even when the RPC cannot run eth_simulateV1
--walletnoconnected walletWallet to observe in dry-run. Ignored with --execute.
aero serve --once

aero alm init#

Write the ALM config from your current CL positions.

FlagRequiredDefaultMeaning
--chainno8453Chain id written to the config
--walletnoconnected walletOwner of the positions
--position-idnoallOnly this NFT. Required when several positions share a pool.
--strategynooriginaloriginal, lazy-syncing, lazy-ascending, lazy-descending or expand
--forcenooffOverwrite an existing config file
--configno~/.config/sugar-ts/alm.jsonWhere to write
aero alm init --strategy lazy-syncing

aero alm status#

Show tick, range, strategy and rebalance gate for every managed position, or the cycles that need recovery.

FlagRequiredDefaultMeaning
--configno~/.config/sugar-ts/alm.jsonALM config file
--walletnoSafe in the config, then connected walletWallet to inspect
aero alm status

aero alm safe-setup#

Disabled in this release. The command exits with an error before doing anything. Its flags are listed for completeness.

FlagRequiredDefaultMeaning
--safeyesnoneSafe that owns the positions
--keepernolocal walletKeeper address
--rolenoaero-almRole name
--salt-nonceno0Module proxy factory salt nonce
--outno./aero-alm-safe-setup.jsonOutput file
--configno~/.config/sugar-ts/alm.jsonALM config file
aero alm safe-setup --safe 0xOWNER

aero alm recover#

Check receipts for an interrupted ALM cycle. Never signs or restarts a phase.

FlagRequiredDefaultMeaning
--idyesnoneCycle id from aero alm status
aero alm recover --id CYCLE_ID

aero alm resolve#

Mark a manually repaired cycle as resolved so new cycles can start. Asks for confirmation.

FlagRequiredDefaultMeaning
--idyesnoneCycle id
--noteyesnoneWhat you verified and repaired
--position-idnoreplacement NFT, then originalNFT to manage from now on
aero alm resolve --id CYCLE_ID --note "Verified receipts and restaked the new position"

TUI#

aero tui#

Open the full-screen terminal UI. No flags. See TUI.

aero tui

Guide#

aero guide#

Print a walkthrough. Without a topic it lists all topics.

ArgumentRequiredMeaning
topicnogetting-started, wallet, swap, liquidity, staking, rewards, venft, alm, analytics, chains or completions
aero guide liquidity