CLI for interacting with Jupiter's products on Solana: Spot, Perps, Lend, Prediction Markets and more.
Install via npm:
npm i -g @jup-ag/cliOr use the install script to auto-detect the best method:
curl -fsSL https://raw.githubusercontent.com/jup-ag/cli/main/scripts/install.sh | bash# Generate a new key called 'default'
jup keys add default
# Or import an existing Solana CLI keypair
jup keys solana-import
# View your spot portfolio
jup spot portfolio
# Swap 1 SOL to USDC
jup spot swap --from SOL --to USDC --amount 1
# Open a 3x long SOL position with $10 USDC
jup perps open --asset SOL --side long --amount 10 --input USDC --leverage 3
# View your perps positions
jup perps positionsNote
This CLI is designed to be LLM friendly and all commands are non-interactive. Set JSON output mode globally for structured responses jup config set --output json, or use -f json flag on individual commands.
See the /docs directory for specific guides and workflows: