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

Selecting the Environment

The first thing to do in the CLI is to choose which environment to use. There are three main environments:

  • Mainnet: Connects to the mainnet chain configs.

  • Testnet: Connects to testnet chain configs.

  • Devnet: Connects to devnet chain configs. Used mainly in Andromeda dev events such as hackathons and beta testing.

You can run the following command and then select from the displayed envs:

env use

Selecting the Chain

Next, you need to select 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 add a wallet:

wallet generate

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>>

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.

env

Manage your environments.

Exits the CLI.

Query Apps and assets 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.

Last updated

Was this helpful?