CLI

resources/images/screenshots/cli.png

Bitxor CLI is an Open Source command-line interface to interact with the blockchain. The source code is available at GitHub.

Installation

Bitxor CLI is distributed using the node package manager npm.

Note

Bitxor CLI requires node.js 12 LTS to run. It is recommended that you install node.js using nvm.

Execute the following command in a new terminal:

npm install --global bitxor-cli

Configuration

To start using Bitxor CLI, configure a profile. Profiles are used to set a base NODE_URL and account to sign transactions.

bitxor-cli profile import --private-key <PRIVATE_KEY> --network TEST_NET --url <NODE_URL> --password <PASSWORD> --profile <PROFILE_NAME>

By default, Bitxor CLI will always use the default profile. To use a named profile with any other command, add the --profile option to the command.

bitxor-cli account info --profile <PROFILE_NAME>

If you are going to use named profile for multiple commands, you can change the default profile with the following command.

bitxor-cli profile setdefault --profile <PROFILE_NAME>

If you do not have a private key to create a profile, you can generate a new account, add a node URL and save it as default or named profile.

bitxor-cli account generate --network TEST_NET --url <NODE_URL> --password <PASSWORD> --profile <PROFILE_NAME> --save

Commands

Bitxor CLI is deprecated. These are the available commands for the latest Bitxor CLI.

Find out which CLI version do you have installed by running bitxor-cli from the command line.