Andromeda
ADO LibraryBuild AppsDevelop ADOsCLIWeb Application Docs
Andromeda Archives
Andromeda Archives
  • Platform and Framework
    • Introduction to AndromedaOS
    • ADO Classes
    • Andromeda Messaging Protocol
      • Kernel
      • ADO Database
      • Economics Engine
      • Virtual File System
    • ADO Base
      • AndromedaMsg V1.0.0
      • AndromedaQuery V1.0.0
    • Common Types
    • Deployed Contracts
  • Andromeda Digital Objects
    • Introduction to ADOs
    • Auction V1.0.0
    • App V1.0.1
    • Crowdfund V1.0.0
    • CW20 V1.0.0
    • CW20 Staking V1.0.0
    • CW721 V1.0.0
    • CW20 Exchange V1.0.0
    • Lockdrop V1.0.0
    • Marketplace V1.0.0
    • Merkle-Airdrop V1.0.0
    • Rate Limiting Withdrawals V1.0.0
    • Splitter V1.0.0
    • Timelock V1.0.0
  • Andromeda Apps
    • Introduction to Apps
    • Crowdfunding App
    • Auctioning App
    • Cw20 Staking App
    • Marketplace App
  • Developing an ADO
    • Getting Started
      • Instantiation
      • Execution
      • Queries
      • Testing
    • ADO Example
    • ADO Submissions
  • Andromeda CLI
    • Introduction
    • Help and Shortcuts
    • ADO
    • Bank
    • Chain
    • Env
    • Gql
    • Tx
    • OS
    • Wallet
    • Wasm
    • Clearing CLI Data
    • Clear and Exit
  • Chain
    • Running a Node
    • Staking and Rewards
  • Andromeda Dashboard
    • Tokenomics Dashboard
    • Dashboard API
  • Additional Resources
    • GitHub
    • Website
    • White Paper
Powered by GitBook

Additional Resources

  • Github
  • Website

Community

  • Discord
  • Telegram

Socials

  • Twitter
  • Medium
  • Youtube
On this page
  • Installation
  • CLI Commands
  • Deployed Chains
  • Getting Started
  • CLI Display
  • Start Exploring

Was this helpful?

  1. Andromeda CLI

Introduction

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

PreviousADO SubmissionsNextHelp and Shortcuts

Last updated 7 months ago

Was this helpful?

Installation

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

Make sure you have npm installed.

sudo npm i -g @andromedaprotocol/cli

We use sudo since we are installing globally using the -g flag.

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:

You can run "version" in the CLI to check the CLI version you have downloaded.

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

The Andromeda CLI is built to work with any of the chains that Andromeda is deployed on. This would remove the need for users to learn how to deploy contracts on each of the chains allowing them to use this CLI to interact with ADOs anywhere on the Cosmos ecosystem.

Deployed Chains

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.

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

This creates a new wallet address. If you already have an address, you can import it to the CLI using the "wallet recover" command.

wallet generate

Make sure to save the seed phrase somewhere private and secure as it is the only way to recover your wallet.

You will be prompted to select the wallet name.

If you are using a testnet config make sure to send some tokens to your new address from the corresponding testnet faucet.

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

The --help flag can be used after any command to get information on the command.

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.

Manage your environments.

Exits the CLI.

Query Apps and assets using the Andromeda GraphQL service.

Lists all valid commands.

Query transactions information.

Prints the current CLI version.

Manage wallets.

Send messages to the chain using wasm.

It is important to note that the CLI has been designed to prompt the user for the required fields in each command. This means that it is sufficient to write the command without the fields and the CLI will prompt you to fill in the inputs one by one instead of throwing an error.

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

Execute and Query messages on the OS ADOs like the , , and .

ado
bank
chain
clear
env
exit
gql
help
tx
os
Kernel
VFS
ADODB
wallet
wasm
npm package
version
chain new
Andromeda CLI