- install go if you haven't already
brew install go
- clone the repository and build the cli
git clone https://github.com/joaofnds/blockchain
cd blockchain
go build ./cmd/cli/cli.go
- print the example blockchain
./cli print -file ./example.json
- add a block
printf "Hello" | ./cli add -file example.json
- print again to see the new block
./cli print -file ./example.json