Are you looking into Symbol / NEM / Catapult ? Perfect! Do you need help on how to use Symbol Command Line Interface?
Following steps will be needed to configure your environment:
Table of contents
- Installing the Command Line Interface (CLI)
- Importing an account
- Connecting to a Symbol network
- Reading the current blockchain height
Installing the Command Line Interface (CLI)
You can install the Symbol Command Line Interface (CLI) with NPM on your machine.
Steps to install the Command Line Interface:
- Run the following command in your terminal: npm install -g symbol-cli@latest
You should see it download all dependencies and afterwards the symbol-cli package will be installed and ready to use.
Importing an account
Next on the line is the creation of an account. There is two ways to create accounts with the CLI. One is to create it by importing a Private Key and the other is to create it by importing a 24-words mnemonic pass phrase.
Steps to import a profile by Private Key
- Run the following command in your terminal: symbol-cli profile import
- It asks you to select between: MAIN_NET, TEST_NET, MIJIN and MIJIN_TEST. You want to pick TEST_NET here.
- Now you will be asked to enter a Node URL. An example here can be: http://dual-001.symbol.ninja:3000.
- It now tells you to Enter a profile name. You can pick any profile name that helps.
- Next you will be prompted to enter a wallet password. This step is required to improve security around how your Private Key will be stored on device.
- Now select whether you want to make that account the default account, or not.
- At last, select the import type PrivateKey and input your private key when asked.
Steps to import a profile by Mnemonic Pass Phrase
- Run the following command in your terminal: symbol-cli profile import
- It asks you to select between: MAIN_NET, TEST_NET, MIJIN and MIJIN_TEST. You want to pick TEST_NET here.
- Now you will be asked to enter a Node URL. An example here can be: http://dual-001.symbol.ninja:3000.
- It now tells you to Enter a profile name. You can pick any profile name that helps.
- Next you will be prompted to enter a wallet password. This step is required to improve security around how your Private Key will be stored on device.
- Now select whether you want to make that account the default account, or not.
- At last, select the import type Mnemonic and input your 24-words passphrase when asked.
Connecting to a Symbol network
As mentioned in the steps for importing an account, you will be connecting to a Symbol Network by entering the Node URL. This is the bit of information that the Symbol Command Line Interface needs to be able to communicate with networks using Symbol.
Find out information about a Symbol Network
- symbol-cli chain info
Monitor your Account with the CLI
- symbol-cli account info
Your environment is now setup and secured. Move over to the next section to find out how to use the Symbol Command Line Interface for more precise interactions with a Symbol Network.
Reading the current blockchain height
Fetch Blockchain Height data with the CLI:
- Execute the following command in your terminal: symbol-cli chain info
That’s pretty much it about how to use Symbol Command Line Interface.
We hope you enjoyed this quick tutorial. Feel free to give us your feedback about your Setup experiences!
We hope that this article was insightful for you and are looking forward to any feedback and messages. Please share your thoughts in the comments section below!
Disclaimer
This website may contain information about financial firms, employees of such firms, and/or their products and services such as real estate, stocks, bonds, and other types of investments. While this website may intend - as the author deem necessary - to provide information on financial matters and investments, such information or references should not be construed or interpreted as investment advice or viewed as an endorsement.