docs
  • Introduction
  • Getting started
    • Meet the network using CLI
    • Your first transaction
    • Run smart contract
    • Run your own node
    • Ledger Support
  • Architecture
    • Dnode
    • Dncli
    • XFI & Other coins
    • Fees & Gas
    • Addresses
  • Staking
    • Delegate sXFI & LPT
    • Become a validator
    • Rewards & Inflation
    • Slashing
    • More
  • Move VM
    • Modules
    • Scripts
    • Script Arguments
    • Standard Library
    • Events
    • Resources
    • Move Book
    • More
  • Oracles
    • Query Price
  • PegZone
    • Deposit
    • Usage
    • Withdraw
  • Useful Resources
    • Dfinance Website
    • Wallet
    • Move Book
    • Block Explorer
    • Swagger UI
    • Community
    • VSCode Move IDE
Powered by GitBook
On this page
  • Installation using precompiled binaries
  • Configuration
  • Installation from sources
  • Build and Install using Makefile
  • Build without Makefile

Was this helpful?

Getting started

PreviousIntroductionNextMeet the network using CLI

Last updated 4 years ago

Was this helpful?

Here is a guide on how to install dncli command line interface and connect to dfinance.

Installation using precompiled binaries

First of all download the latest version of dncli for your system from .

Install downloaded dncli binary.

For Mac OS/Linux:

mv <downloaded binary path> ./dncli
chmod +x ./dncli
mv ./dncli /usr/local/bin/dncli

For Windows:

  1. Go to "Program Files" directory.

  2. Create there "dn" directory.

  3. Rename the downloaded file to "dncli" and put it into "dn" directory.

Now "cmd" and execute:

setx path "%path%;%ProgramFiles%\dn"

Now restart "cmd".

Check that installation successful done by running the command:

dncli version

Your should see your current version of dncli in output.

Configuration

Let's configure dncli and after go to the next step:

dncli config chain-id dn-testnet
dncli config output json
dncli config indent true
dncli config trust-node true
dncli config compiler tcp://pub.dfinance.co:50051
dncli config node https://rpc.dfinance.co:443
dncli config keyring-backend file

These configurations will connect your local dncli with remote nodes.

Check that dncli configurated correctly:

dncli status

Installation from sources

Required:

  • golang 1.13.8 or later.

Build and Install using Makefile

Clone dfinance node repository to suitable place

git clone https://github.com/dfinance/dnode.git

Build and install dncli as binary using Makefile

make install-dncli

So after this command dncli will be available from console

dncli version --long

Build without Makefile

And let's build dncli:

GO111MODULE=on go build -o dncli cmd/dncli/main.go

Command must execute fine, after it you can run dncli:

./dncli version --long

Before we start you should have a correct 'GOPATH', 'GOROOT' environment variables, also installed .

protoc - here is .

release pages
Golang
installation instruction