Skip to content

Latest commit

 

History

History
186 lines (117 loc) · 3.93 KB

install_from_source.md

File metadata and controls

186 lines (117 loc) · 3.93 KB

This document will describe how to build the Coinset CLI tool from source. If you are looking for a binary version of the tool, see the latest release.

Regardless of which operating system you are using, you will need to use the git command line tool. If you do not have git installed, follow the instructions to install it before continuing.

MacOS

  1. Verify that Go/golang is installed by running
go

You should see a usage statement. If instead you see an error, see the Go website for instructions to install Go.

  1. Clone this repository
git clone https://github.com/coinset-org/cli.git
  1. Change to the command line directory
cd cli/cmd/coinset
  1. Build coinset
go build
  1. To verify that the installation was successful, run a command, for example
./coinset get_blocks 123 125

This should return info from the requested blocks.


Linux

  1. On Debian/Ubuntu, install Go/golang by running
sudo apt install golang-go

To install Go on other distributions, see the Go website for instructions.

  1. Clone this repository
git clone https://github.com/coinset-org/cli.git
  1. Change to the command line directory
cd cli/cmd/coinset
  1. Build coinset
go build
  1. To verify that the installation was successful, run a command, for example
./coinset get_blocks 123 125

This should return info from the requested blocks.


Windows

Golang Installation

You will need to use Go/golang for installing coinset. To install golang, Chocolatey (similar to apt-get on Linux) is recommended. To install Chocolatey and golang, open a Powershell window as an administrator, then run the following:

  1. Set up an execution policy:
Set-ExecutionPolicy -Scope CurrentUser
  1. You will be prompted to enter a policy. Enter the following and press enter:
RemoteSigned

Enter y to allow the changes to take effect.

  1. To verify this change, list all policies:
Get-ExecutionPolicy -List

Among the list, you should see CurrentUser RemoteSigned.

  1. Create a new web client object:
$script = New-Object Net.WebClient
  1. Install Chocolatey:
iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex

You should see several lines of output, including Installing Chocolatey on the local machine.

  1. Close your Powershell window and open a new one as administrator.

  2. Upgrade Chocolatey:

choco upgrade chocolatey

You should now be using the latest version.

  1. Install golang:
choco install -y golang
  1. Close your Powershell window and open a new one (not as administrator).

  2. Verify that golang is installed and accessible:

go version

You should be shown the current version, for example go version go1.23.1 windows/amd64.

Coinset Installation

  1. Make and change to a directory for the Coinset repository
mkdir coinset-org
cd coinset-org
  1. Clone this repository
git clone https://github.com/coinset-org/cli.git
  1. Change to the command line directory
cd .\cli\cmd\coinset
  1. Build coinset
go build
  1. To verify that the installation was successful, run a command, for example
.\coinset get_blocks 123 125

Be sure to include the .\ before the coinset command. This should return info from the requested blocks. If you see extra characters such as ←[37m before each line, you are likely either running Powershell as an administrator (not recommended), or are not using the latest version (the latest version is recommended).