Skip to main content

@switchboard-xyz/cli

A command line tool to interact with Switchboard.

oclif Version Downloads/week License

Install

Run the following command to install the sb binary in your $PATH.

npm install -g @switchboard-xyz/cli

You can re-run this command to upgrade your CLI version or run the command:

sb update stable

Setup

Solana

# Devnet
sb config set solana devnet rpc https://api.devnet.solana.com
sb config set solana devnet default-account "~/.config/solana/id.json"

# Mainnet
sb config set solana mainnet-beta rpc https://api.mainnet-beta.solana.com
sb config set solana mainnet-beta default-account "~/.config/solana/id.json"

Arbitrum

# Testnet
sb config set arbitrum testnet rpc https://goerli-rollup.arbitrum.io/rpc
sb config set arbitrum testnet default-account "~/.config/arbitrum/testnet.txt"

# Devnet
sb config set arbitrum mainnet rpc https://arb1.arbitrum.io/rpc
sb config set arbitrum mainnet default-account "~/.config/arbitrum/mainnet.txt"

Aptos

# Testnet
sb config set aptos testnet rpc https://fullnode.testnet.aptoslabs.com/v1
sb config set aptos testnet default-account ".aptos/config.yaml"

# Devnet
sb config set aptos devnet rpc https://fullnode.devnet.aptoslabs.com/v1
sb config set aptos devnet default-account ".aptos/config.yaml"

CoreDAO

# Testnet
sb config set coredao testnet rpc https://rpc.test.btcs.network
sb config set coredao testnet default-account "~/.config/coredao/testnet.txt"

# Devnet
sb config set coredao mainnet rpc https://rpc.coredao.org
sb config set coredao mainnet default-account "~/.config/coredao/mainnet.txt"

NEAR

# Testnet
sb config set near testnet rpc https://rpc.testnet.near.org
sb config set near testnet default-account my-named-account.testnet

# Mainnet
sb config set near mainnet rpc https://rpc.mainnet.near.org
sb config set near mainnet default-account my-named-account.near

Commands

Config Commands


Aptos Commands


Evm Commands


Near Commands


    Solana Commands