Install Saga CLI

Good to know: You would need a computer which has a decent and reliable connection to the internet. Additionally, if you have a firewall, you will need to ensure that outbound traffic is allowed for port 443 (HTTPS).

Installation (Linux or Mac)

At the shell prompt, type to unarchive and install the cli in the desired path

tar -xzf <tar.gz file downloaded> -C <directory to install sagacli>


tar -xzf pegasus.tar.gz -C /usr/local/bin/

Depending on the folder you decide to install sagacli to, you may need to use sudo permissions i.e. prefixing your command with sudo. Also check if the directory <directory to install sagacli> in step 1 is already in the PATH e.g. on Linux

If the directory is not in the PATH, add it to the PATH depending on your host operating system and shell used. Example, on Linux you would use:

export PATH=$PATH:<directory to install sagacli>

We recommend adding this change to your shell's profile (~/.profile or ~/.bashrc or ~/.bash_profile).

On Linux and Mac, ensure you source the profile updates e.g. source ~/.profile or source ~/.bash_profile etc., depending on the file you updated.

On some versions of MacOS, you will need to remove the newly downloaded binary from quarantine by using the following command in your terminal: xattr -d /path/to/sagacli

Test that sagacli has been installed by running sagacli from any shell prompt. You should get an output like this:

Interact with Pegasus

  sagacli [command]

Available Commands:
  account     Account queries and transactions subcommands
  chainlet    Chainlet queries and transaction subcommands
  completion  Generate the autocompletion script for the specified shell
  config      Create or query an application CLI configuration file
  help        Help about any command
  keys        Manage your application's keys
  status      Query configured systems status
  tx          Transactions queries subcommands

      --controller string          controller grpc url (host:port) (default "")
      --from string                Name of private key used to sign (default "bogdan_local")
  -h, --help                       help for sagacli
      --keyring-backend string     Select keyring's backend (os|file|test) (default "file")
      --ledger                     Use the connected Ledger device for signing tx
  -l, --loglevel string            commands logging level (default "info")
      --network-rpc string         <host>:<port> to tendermint rpc interface for remote chain (default "")
  -o, --output string              output type <text|json> (default "text")
      --platform-chain-id string   The SPC network chain ID (default "spc-testnet-1")
  -v, --version                    version for sagacli

Use "sagacli [command] --help" for more information about a command.

Last updated