Skip to main content

A command line tool to monitor and manage litetokens nodes.

Project description

LITETOKENS-CLI

#
#
#   ██▓     ██▓▄▄▄█████▓▓█████▄▄▄█████▓ ▒█████   ██ ▄█▀▓█████  ███▄    █   ██████ 
#  ▓██▒    ▓██▒▓  ██▒ ▓▒▓█   ▀▓  ██▒ ▓▒▒██▒  ██▒ ██▄█▒ ▓█   ▀  ██ ▀█   █ ▒██    ▒ 
#  ▒██░    ▒██▒▒ ▓██░ ▒░▒███  ▒ ▓██░ ▒░▒██░  ██▒▓███▄░ ▒███   ▓██  ▀█ ██▒░ ▓██▄   
#  ▒██░    ░██░░ ▓██▓ ░ ▒▓█  ▄░ ▓██▓ ░ ▒██   ██░▓██ █▄ ▒▓█  ▄ ▓██▒  ▐▌██▒  ▒   ██▒
#  ░██████▒░██░  ▒██▒ ░ ░▒████▒ ▒██▒ ░ ░ ████▓▒░▒██▒ █▄░▒████▒▒██░   ▓██░▒██████▒▒
#  ░ ▒░▓  ░░▓    ▒ ░░   ░░ ▒░ ░ ▒ ░░   ░ ▒░▒░▒░ ▒ ▒▒ ▓▒░░ ▒░ ░░ ▒░   ▒ ▒ ▒ ▒▓▒ ▒ ░
#  ░ ░ ▒  ░ ▒ ░    ░     ░ ░  ░   ░      ░ ▒ ▒░ ░ ░▒ ▒░ ░ ░  ░░ ░░   ░ ▒░░ ░▒  ░ ░
#    ░ ░    ▒ ░  ░         ░    ░      ░ ░ ░ ▒  ░ ░░ ░    ░      ░   ░ ░ ░  ░  ░  
#      ░  ░ ░              ░  ░            ░ ░  ░  ░      ░  ░         ░       ░  
#                                                                                 
#

A command line tool, to quick set up, turn on/off (multiple) litetokens nodes(full/solidity), and monitor running status.

Python JDK
3.7+ 1.8

Install

pip

pip install --upgrade pip

pip install litetokenscli

FAQs on installation

  1. How to fix "fail to build a wheel for psutil" error?

    a. please check if you installed clang correctly, or install it using homebrew:

    brew install --with-toolchain llvm
    

    b. please check if you are using python 3.x

  2. How to test in virtual environment?

    a. create virtual environment

    python3 -m venv venv
    

    b. activate venv

    . ./venv/bin/activate
    

    c. install litetokenscli in venv

    pip install litetokenscli
    

    d. when done testing, or using the venv - to deactivate venv

    deactivate
    

Usage

Command Functions Example1 Example2
litetokens-cli init --version Init dirs and fetch code. litetokens-cli init litetokens-cli init --version 3.1.3
litetokens-cli config --nettype --fullhttpport --solhttpport --fullgrpcport --solgrpcport Create and customize config files. litetokens-cli config litetokens-cli config --nettype main --fullhttpport 8500 --solhttpport 8600 --fullgrpcport 50051 --solgrpcport 5001
litetokens-cli run --nodetype Run node. litetokens-cli run litetokens-cli run --nodetype sol
litetokens-cli stop --pid Stop node. litetokens-cli stop litetokens-cli stop --pid 7777
litetokens-cli status --node Monitor nodes status. litetokens-cli status litetokens-cli status --node 777
litetokens-cli quick Quick start. litetokens-cli quick litetokens-cli quick
litetokens-cli -h, --help Check help manual. litetokens-cli -h litetokens-cli --help

overall

litetokens-cli -h
usage: litetokens-cli [-h] {init,config,run,stop,status,quick} ...

which subcommand do you want?

optional arguments:
  -h, --help            show this help message and exit

subcommands:
  {init,config,run,stop,status,quick}
    init                Init dirs and fetch code.
    config              Create customize config files.
    run                 Run node.
    stop                Stop node.
    status              Monitor nodes status.
    quick               Quick start. (run a full private node by one command)
subcommand: init
litetokens-cli init -h
usage: litetokens-cli init [-h] [--version VERSION]

optional arguments:
  -h, --help         show this help message and exit
  --version VERSION  specify java-litetokens version
subcommand: config
litetokens-cli config -h
usage: litetokens-cli config [-h] [--nettype NETTYPE] [--fullhttpport FULLHTTPPORT]
                       [--solhttpport SOLHTTPPORT] [--fullrpcport FULLRPCPORT]
                       [--solrpcport SOLRPCPORT] [--enablememdb ENABLEMEMDB]

optional arguments:
  -h, --help            show this help message and exit
  --nettype NETTYPE     specify net type [main, private]
  --fullhttpport FULLHTTPPORT
                        specify full http port
  --solhttpport SOLHTTPPORT
                        specify solidity http port
  --fullrpcport FULLRPCPORT
                        specify full rpc port
  --solrpcport SOLRPCPORT
                        specify solidity rpc port
  --enablememdb ENABLEMEMDB
subcommand: run
litetokens-cli run -h
usage: litetokens-cli run [-h] [--nodetype NODETYPE]

optional arguments:
  -h, --help           show this help message and exit
  --nodetype NODETYPE  specify node type [full, sol]
subcommand: stop
litetokens-cli stop -h
usage: litetokens-cli stop [-h] --pid PID

optional arguments:
  -h, --help  show this help message and exit
  --pid PID   stop node by given pid
subcommand: status
litetokens-cli status -h
usage: litetokens-cli status [-h] [--node NODE]

optional arguments:
  -h, --help   show this help message and exit
  --node NODE  check specific node detail by pid

Changelog

In doing

[ ] run - filter nodes

[ ] dump - fetch a dump

[ ] init - add option to build from source code

[ ] run - multiple (full) nodes

[ ] robust - catch more errors and provide better error msg

[ ] config -- add option to config to sync with newly deployed shasta testnet

[ ] status -- add config setting in status json

Version 0.1.4

[X] update to support version 3.2 fetch release, check version

[X] compatible check with version 3.2 release, and update config handler

[X] add more info message;

[X] provide a more neat yet detail help info and command

Version 0.1.3

[X] run - check single ps status

[X] keep track of all running nodes

[X] run - monitor overall system status

[X] set default value for all subcommand options

Version 0.1.2

[X] catch download errors

[X] add progress bar for download

[X] colorful logo and msg

[X] add more progress msg on ports config

[X] add more progress msg on net_type config

[X] add info msg type for instructions

[X] move changelog to file

[X] optimize progress bar

Version 0.1.0

[X] init - set up file folders, and get builds based on given version number

[X] config - init basic config file in json format, and convert to java properties format and export

[X] run - run a single main net full node

[X] quick start

[X] run - move 'run' to its handler, and async the call

[X] stop - add sub cmd and its handler to stop all nodes (kill -15)

[X] run - change log and data store location

[X] config - add custom method to fire up private/shasta testnet

[X] config - add custom method to change port number

[X] config - add custom method to fire up solidity node

[X] run - add option to run solidity node

[X] pack to pip

[X] Doc - add more instruction in readme file

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

litetokenscli-0.1.4.tar.gz (14.4 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

litetokenscli-0.1.4-py3.6.egg (36.9 kB view details)

Uploaded Egg

litetokenscli-0.1.4-py3-none-any.whl (20.4 kB view details)

Uploaded Python 3

File details

Details for the file litetokenscli-0.1.4.tar.gz.

File metadata

  • Download URL: litetokenscli-0.1.4.tar.gz
  • Upload date:
  • Size: 14.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.6.9

File hashes

Hashes for litetokenscli-0.1.4.tar.gz
Algorithm Hash digest
SHA256 a9dfb0058d879a98d8ee2d52ad71ac27adb8687b4231db75b6527e3c93dd0a2b
MD5 4fb995ff6e0b75660a7a082ce8c41d74
BLAKE2b-256 a75433bf22a732c106d754c8ca1499a057454d467355abd69522d7b6985a584b

See more details on using hashes here.

File details

Details for the file litetokenscli-0.1.4-py3.6.egg.

File metadata

  • Download URL: litetokenscli-0.1.4-py3.6.egg
  • Upload date:
  • Size: 36.9 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.6.9

File hashes

Hashes for litetokenscli-0.1.4-py3.6.egg
Algorithm Hash digest
SHA256 ef180d7e6cc850c5ca5f11c53edc3b94b146b9e01d91ebf400f03d5f4d07bf87
MD5 213f7c044c191ec015db5fa9a3d0826b
BLAKE2b-256 49d8b7b23cd226a7c342e1166463add6f31c54085e422ad302af51133ce88bc3

See more details on using hashes here.

File details

Details for the file litetokenscli-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: litetokenscli-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 20.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.6.9

File hashes

Hashes for litetokenscli-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b6019905b61f6860d0285f4b3ed1395e53ad067d67ba88347580acae208cec8d
MD5 fa3926af9a52713a3dd5550f220d0170
BLAKE2b-256 6b36039ad15d7a8bf8e35b3afd280ae0405358bc77697e3c690346d4239be75a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page