Download & Setup
The Harmony CLI tool is used to interact with the Harmony blockchain.
Download Harmony CLI tool
1. For Linux
Enter the following command into your shell of choice:
curl -LO https://harmony.one/hmycli && mv hmycli hmy && chmod +x hmy2. For MacOS
hmy depends on some dynamic libraries, hence we recommend using the shell wrapper. Enter there commands into your terminal:
curl -O https://raw.githubusercontent.com/harmony-one/go-sdk/master/scripts/hmy.sh
chmod u+x hmy.sh
./hmy.sh -dNow you can use hmy.sh as a wrapper over hmy and you should assume that all references to hmy in these documents refer to hmy.sh. For example, the command ./hmy becomes ./hmy.sh -- .
Note that since hmy is not statically linked, you cannot arbitrarily move hmy.sh to anywhere on your filesystem like you could with a single binary.
3. Compiling from source
If you are interested in compiling from source, then the process is more involved.
Steps:
Clone the repository at the same level as the main Harmony repo:
cd $(go env GOPATH)/src/github.com/harmony-one
ls
bls harmony mcl
git clone https://github.com/harmony-one/go-sdk.gitThen setup the build flags:
source harmony/scripts/setup_bls_build_flags.shCall
makein thego-sdkrepo. This builds a binary namedhmy:
cd go-sdk
makeCongratulations! You can now use the binary to run the CLI.
Last updated
Was this helpful?