This article was first published on Stories by TRON Foundation on Medium
TRON Developer Guide — TRON-CLI
TRON-CLI is a command line tool which allows developers to quickly set up and manage TRON Nodes and service.
- Python 3.6+
- JDK 1.8
- MongoDB (for event server)
- MacOS or Linux
In the destination directory, optionally set up the python virtual environment and activate the environment. Then perform the pip install for troncli.
python3 -m venv venv // Optional step
. ./venv/bin/activate // Optional step
pip install troncli
Why Python Virtual Environments?
TRON-CLI, like many Python programs, contains essential dependency files. In the absence of a Python Virtual Environment, a pip install command by default downloads the required package into your local machine's lib/python/site-packages directory. If another Python program checks for a different version of the same package dependency, that program may end up using the wrong package since there exists no indication of version number. With a Python Virtual Environment, all the required dependencies are neatly packaged into a venvdirectory that conveniently resides on the same level as your working directory. This eliminates any potential confusion stemming from package name overlap, as well as making the package easier to locate.
A successful pip install within the virtual environment produces the following output:
Successful pip install output
TRON-CLI Interactive Mode
Quickly set up what you want by answering a few questions:
For those wanting to start up a local private network, you can run the command tron-cli quick. This command sets up the tron_nodes directory and sub-folders, moves the .jar files into the folders, sets up the configuration files on default ports, runs the node, and outputs the status details.
- Shell ...
To keep reading, please go to the original article at:
Stories by TRON Foundation on Medium