Introduction

This document is a guide to start using the Andromeda CLI.

Installation

To install the Andromeda CLI, run the following command to download our npm package:

sudo npm i -g @andromedaprotocol/cli

If you have the package already installed, you can run the following to update to the latest version:

sudo npm update -g @andromedaprotocol/cli

Then run andr to open the CLI:

Andromeda CLI

CLI Commands

Now that we have the CLI open, we can start exploring some of its functions which include:

  • Generating keys and managing wallets.

  • Swap between chains with one command.

  • Interact with the chain of your choice

  • Query using our GraphQL server.

Deployed Chains

Testnets are currently disable in CLI but will be added very shortly.

To get the list of chains that are integrated with the Andromeda system, run:

chain list

Getting Started

The first thing to do in the CLI is to choose the chain config and wallets to use.

Run:

chain use 

You will be prompted to choose a chain config from a list:

The chain Ids are the same as the ones for the testnets they correspond to.

You can also create your own chain config using the chain new command.

? Input the chain ID to use: (Use arrow keys or type to search, tab to autocomplete)
❯ andromeda 
  terra 
  archway  

Choose the chain config that you want to use. Then we need to add a wallet. We run:

wallet add 

You will be prompted to select the wallet name.

CLI Display

You will notice something similar to ? user@galileo-3> in the CLI. This signifies which wallet and chain-Id are currently in use. It is formatted in the following way:

? $<Wallet>@<ChainId>>

Switching to Testnet

You can switch from testnet to mainnet using the same process.

Switching to a testnet is a two step process:

  1. Set the graphql url to point to testnet by running:

gql url set

Then select TESTNET from the options.

  1. Select the chain to use by running:

chain use

Then select the testnet chain to connect to.

Start Exploring

We can start off by running andr --help to see what are the available commands.

andr --help 

Or just:

help

You will get a list of available commands to use:

Command
Description

Query and execute messages on an ADO.

Send tokens or query address balances.

Manage the chains and their configs.

Clears the terminal.

Exits the CLI.

Query Apps using the Andromeda GraphQL service.

Lists all valid commands.

Query transactions information.

Execute and Query messages on the OS ADOs like the Kernel, VFS, and ADODB.

Prints the current CLI version.

Manage wallets.

Send messages to the chain using wasm.

Was this helpful?