-
Notifications
You must be signed in to change notification settings - Fork 8
CLI
This page will guide you through the use of the command-line a.k.a. CLI for ergpy
.
---
title: Ergpy CLI features
---
flowchart TD
subgraph implemented
wallet-address
box-info
version
simple
token
end
ergpy([ergpy]):::root
ergpy --> get:::command
ergpy --> create:::command
ergpy --> send:::command
ergpy --> version:::command
get --> wallet-address
get --> box-info
send --> simple
send --> token
create --> nft
create --> token
create --> gensis-box
create --> issuer-box
In order to properly use the command-line ergpy
make sure to set up a virtual environment. In order to
do so you can type the following command :
python -m venv env
Note
This command will create a folder within the path you are currently located at.
After you made sure that the folder was created, use this virtual environment. In order to do so you can use the command source env/bin/activate
.
Note
Personal I see a
(env)
appear in front of my terminal input after typing the command. But you can also typewhich python
, this command should print something like<your-path>/ergpy/env/bin/python
.
# Installation
First things first, to make sure that your environment takes into account the command, we will install the package with the following command :
python -m pip install -e .
Note
This will make sure that the entry point (
ergpy
) is taken into thePATH
.
To check if the installation is properly done, check the next section
The CLI is very simple and straightforward, check the help like this :
$ ergpy --help
Usage: ergpy [OPTIONS] COMMAND [ARGS]...
ergpy official CLI
Options:
--help Show this message and exit.
Commands:
create create issuer box, NFT, token...
get Retrieve information about wallet address, box info...
send simple send or send token
In addition to that if you want to check the detail about a specific command :
$ ergpy --help
Usage: ergpy get [OPTIONS] COMMAND [ARGS]...
Retrieve information about wallet address, box info...
Options:
--help Show this message and exit.
Commands:
box-info Retrieve informations about box.
wallet-address Retrieve informations about (a) wallet address(es).
...can we go further with the details though? Yes
Usage: ergpy get wallet-address [OPTIONS]
Retrieve informations about (a) wallet address(es).
Options:
--amount INTEGER Amount of addresses
--wallet-mnemonic TEXT Wallet mnemonic
--mnemonic-password TEXT Password for the mnemonic
--node-url TEXT MainNet or TestNet
--help Show this message and exit.
$ ergpy version
ergpy 0.1.10.0
Note
The output should be blue if your terminal supports it!