Setup Pocket Core CLI

Pocket Core offers a Command Line Interface (CLI) that you will need to get started with managing your nodes wallet, staking tokens, starting your Pocket Node, and other services to help maintain your Node. You can begin using the Pocket Core CLI after you have downloaded and configured it on your computer (or server) by downloading either the Binary or Docker file to configure your environment.

Prerequisites:

Installation:

Installing using Hombrew:

On a Mac or Linux, to install Pocket-Core using Homebrew just run the following commands in your terminal:

$   brew tap pokt-network/pocket-core
$   brew install pokt-network/pocket-core/pocket


# (Optional) 
# Once installed, refresh your terminal screen to incorporate the installation 

Interacting with CLI

$  pocket -h

Pocket is a distributed network that relays data requests and responses to and from any blockchain system.
Pocket verifies all relayed data and proportionally rewards the participating nodes with native cryptographic tokens.

Usage:
  pocket [command]

Available Commands:
  accounts    account management
  apps        application management
  help        Help about any command
  nodes       node management
  query       query the blockchain
  reset       reset pocket-core
  start       starts pocket-core daemon
  util        utilities

Flags:
      --blockTime int             how often should the network create blocks (default 10)
      --datadir string            data directory (default is $HOME/.pocket/
  -h, --help                      help for pocket
      --node string               takes a remote endpoint in the form <protocol>://<host>:<port>
      --persistent_peers string   a comma separated list of PeerURLs: <ID>@<IP>:<PORT>
      --pocketRPCPort string      the port for pocket rpc (default "8081")
      --seeds string              a comma separated list of PeerURLs: <ID>@<IP>:<PORT>
      --tmPeersPort string        the port for tendermint p2p (default "26656")
      --tmRPCPort string          the port for tendermint rpc (default "26657")
  -t, --toggle                    help message for toggle

Use "pocket [command] --help" for more information about a command.

Building With Docker

To download and run the Pocket Core CLI with Docker, open up Terminal and run the following:

$   docker pull poktnetwork/pocket-core:RC-0.2.1

To set up and connect your docker container read our Docker Setup tutorial.

Building from Source

Open up your shell(or terminal) and download the Pocket Core repo from GitHub in the destination directory of your choosing.

# using git clone: 
$  git clone https://github.com/pokt-network/pocket-core.git

# using curl:
$  curl -LJO https://github.com/pokt-network/pocket-core.git

# using wget:
$  wget --no-check-certificate --content-disposition https://github.com/pokt-network/pocket-core

After the repo has been downloaded, go into the pocket-core folder and swap the latest release candidate: 0.2.1:

$  git checkout tags/RC-0.2.1 -b v0.2.1

After you have swapped to the latest release candidate, build your binary and add it to your PATH down below.

# First make sure you have $GOPATH setup
echo $GOPATH

# Example output on MacOS
/Users/<your username>/go

# Inside the pocket-core folder, build your pocket binary and put it in the $GOPATH/bin directory
go build -o $GOPATH/bin/pocket ./app/cmd/pocket_core/main.go

# Test that it's working
$ pocket
Pocket is a distributed network that relays data requests and responses to and from any blockchain system.
Pocket verifies all relayed data and proportionally rewards the participating nodes with native cryptographic tokens.

Usage:
  pocket [command]

Available Commands:
  accounts    account management
  apps        application management
  help        Help about any command
  nodes       node management
  query       query the blockchain
  reset       reset pocket-core
  start       starts pocket-core daemon
  util        utilities

Flags:
      --blockTime int             how often should the network create blocks (default 10)
      --datadir string            data directory (default is $HOME/.pocket/
  -h, --help                      help for pocket
      --node string               takes a remote endpoint in the form <protocol>://<host>:<port>
      --persistent_peers string   a comma separated list of PeerURLs: <ID>@<IP>:<PORT>
      --pocketRPCPort string      the port for pocket rpc (default "8081")
      --seeds string              a comma separated list of PeerURLs: <ID>@<IP>:<PORT>
      --tmPeersPort string        the port for tendermint p2p (default "26656")
      --tmRPCPort string          the port for tendermint rpc (default "26657")
  -t, --toggle                    help message for toggle

Use "pocket [command] --help" for more information about a command.

Your CLI is now built and ready to go, but before you can start staking running a node, you should learn how to use the CLI, getting Testnet POKT tokens, and have a solid understanding of how staking works.

Updated about 13 hours ago



Setup Pocket Core CLI


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.