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.
- 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.
- Clone this repository
git clone https://github.com/coinset-org/cli.git
- Change to the command line directory
cd cli/cmd/coinset
- Build coinset
go build
- 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.
- 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.
- Clone this repository
git clone https://github.com/coinset-org/cli.git
- Change to the command line directory
cd cli/cmd/coinset
- Build coinset
go build
- 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.
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:
- Set up an execution policy:
Set-ExecutionPolicy -Scope CurrentUser
- You will be prompted to enter a policy. Enter the following and press
enter
:
RemoteSigned
Enter y
to allow the changes to take effect.
- To verify this change, list all policies:
Get-ExecutionPolicy -List
Among the list, you should see CurrentUser RemoteSigned
.
- Create a new web client object:
$script = New-Object Net.WebClient
- Install Chocolatey:
iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex
You should see several lines of output, including Installing Chocolatey on the local machine
.
-
Close your Powershell window and open a new one as administrator.
-
Upgrade Chocolatey:
choco upgrade chocolatey
You should now be using the latest version.
- Install golang:
choco install -y golang
-
Close your Powershell window and open a new one (not as administrator).
-
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
.
- Make and change to a directory for the Coinset repository
mkdir coinset-org
cd coinset-org
- Clone this repository
git clone https://github.com/coinset-org/cli.git
- Change to the command line directory
cd .\cli\cmd\coinset
- Build coinset
go build
- 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).