Install and Configure

Install and Configure

This guide covers everything you need to get up and running with the Entropy CLI. We’ll walk you through installation, configuration, and even log management.

Install

Follow these steps to install Entropy globally using NPM:

  1. The CLI requires Node version 20 or higher to run:

    node --version
    v23.1.0
    ℹ️
    Consider using Node Version Manager (NVM) to keep your Node installation organized. NVM also makes it trivial to switch between Node versions when necessary.
  2. Install the Entropy CLI globally using NPM:

    npm install --global @entropyxyz/cli
  3. You can now run the CLI from anywhere using entropy:

    entropy
    Usage: entropy [options] [command]
    
    CLI interface for interacting with entropy.xyz. Running without commands starts an interactive ui
    
    Options:
      -e, --endpoint <endpoint>                           Runs entropy with the given endpoint and ignores
                                                          network endpoints in config. Can also be given a
                                                          stored endpoint name from config eg: `entropy
    
                                                          --endpoint test-net`. (default:
                                                          "ws://testnet.entropy.xyz:9944/", env: ENDPOINT)
      -h, --help                                          display help for command
    
    Commands:
      list|ls                                             List all accounts. Output is JSON of form [{ name,
                                                          address, data }]
    
      balance [options] <address>                         Get the balance of an Entropy account. Output is a
    
                                                          number
      transfer [options] <source> <destination> <amount>  Transfer funds between two Entropy accounts.
      sign [options] <address> <message>                  Sign a message using the Entropy network. Output is
                                                          a signature (string)
  4. You can also interact with the CLI through the TUI by adding tui:

    entropy tui
    ? Select Action (Use arrow keys)
    
    ❯ Manage Accounts
      Balance
      Register
      Sign
      Transfer
      Deploy Program
      User Programs
      Exit

Configuration

The CLI uses a configuration file to set and store basic information. This CLI uses env-paths to determine where configurations files should be stored:

  • Arch: ~/.config/entropy-cryptography/entropy-cli.json
  • MacOS: /Library/Preferences/entropy-cryptography/entropy-cli.json
  • Ubuntu: ~/.config/entropy-cryptography/entropy-cli.json
  • Windows: C:\Users\<USERNAME>\AppData\Roaming\entropy-cryptography\Config\entropy-cli.json

Config file contents

This configuration file contains:

DescriptionName in configuration file
Account informationaccounts: [...]
Which account is currently selectedselectAccount
Endpoints that you are connected toendpoints: {...}
Configuration versionmigration-version
The config file contains your unencrypted private key.

Deleting your config

The config file gets generated the first time that you start the CLI. If you somehow break your config, you can delete your existing config and start the CLI – it will generate a new base config.

Logs

Similar to the configuration file, log files for this CLI can be found in the default env-paths locations:

  • Arch: ~/.local/state/entropy-cryptography/
  • MacOS: /Library/Logs/entropy-cryptography/
  • Ubuntu: ~/.local/state/entropy-cryptography/
  • Windows: C:\Users\<USERNAME>\AppData\Local\entropy-cryptography\Log