proofable-cli

proofable-cli is the command-line interface (CLI) for Proofable API Service (proofable-api). At the moment, it supports certifying a file-system to blockchains

Table of contents

Usage

For macOS users

Install via Homebrew

  1. brew tap southbanksoftware/proofable
  2. brew install proofable-cli

Later on, you can upgrade to the latest version using: brew upgrade proofable-cli

Install directly

Copy and paste the following bash command in a macOS Terminal:

bash -c "$(eval "$(if [[ $(command -v curl) ]]; then echo "curl -fsSL"; else echo "wget -qO-"; fi) https://raw.githubusercontent.com/SouthbankSoftware/proofable/master/cmd/proofable-cli/install.sh")"

Then hit return to run, which will install the latest proofable-cli binary into /usr/local/bin. Then you can use the CLI as:

proofable-cli -h

If you want to install the latest dev (cutting edge) binary, using:

ENV=dev bash -c "$(eval "$(if [[ $(command -v curl) ]]; then echo "curl -fsSL"; else echo "wget -qO-"; fi) https://raw.githubusercontent.com/SouthbankSoftware/proofable/master/cmd/proofable-cli/install.sh")"

To upgrade, simply repeat the installation steps

For Linux users

Install directly

Copy and paste the following bash command in a Linux shell prompt:

sudo bash -c "$(eval "$(if [[ $(command -v curl) ]]; then echo "curl -fsSL"; else echo "wget -qO-"; fi) https://raw.githubusercontent.com/SouthbankSoftware/proofable/master/cmd/proofable-cli/install.sh")"

Then hit return to run, which will install the latest proofable-cli binary into /usr/local/bin. Then you can use the CLI as:

proofable-cli -h

If you want to install the latest dev (cutting edge) binary, using:

sudo ENV=dev bash -c "$(eval "$(if [[ $(command -v curl) ]]; then echo "curl -fsSL"; else echo "wget -qO-"; fi) https://raw.githubusercontent.com/SouthbankSoftware/proofable/master/cmd/proofable-cli/install.sh")"

To upgrade, simply repeat the installation steps

For Windows users

Install directly

Copy and paste the following PowerShell command in a PowerShell prompt:

& ([ScriptBlock]::Create((New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/SouthbankSoftware/proofable/master/cmd/proofable-cli/install.ps1')))

Then hit return to run, which will install the latest proofable-cli.exe binary into your current directory. Then you can use the CLI as:

.\proofable-cli.exe -h

If you want to install the latest dev (cutting edge) binary, using:

& ([ScriptBlock]::Create((New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/SouthbankSoftware/proofable/master/cmd/proofable-cli/install.ps1'))) "dev"

To upgrade, simply repeat the installation steps

Install directly in Windows Subsystem for Linux (WSL)

Follow the same steps for Linux users

Build your own binary

  1. make sure the latest golang is installed
  2. clone this repo
  3. cd cmd/proofable-cli && make

Examples

# for help
./proofable-cli -h

# authenticate with ProvenDB. You don't have to explicitly run this. When you execute a command that requires authentication, it will be automatically run
./proofable-cli auth

# remove existing authentication
./proofable-cli auth -d

# create a proof for a path
./proofable-cli create proof path/to/the/data

# create a proof for a path in a custom location
./proofable-cli create proof path/to/the/data -p path/to/output/the/proof.pxproof

# create a proof for a path including metadata
./proofable-cli create proof path/to/the/data --include-metadata

# verify a proof for a path
./proofable-cli verify proof path/to/the/data

# verify a proof for a path and output the proof's Graphviz Dot Graph
./proofable-cli verify proof path/to/the/data -d path/to/output/the/dot/graph.dot

# verify a proof for a path from a custom location
./proofable-cli verify proof path/to/the/data -p path/to/the/proof.pxproof

# create a subproof out of a proof
./proofable-cli create subproof key1_of_the_proof key2_of_the_proof -p path/to/the/proof.pxproof -s path/to/output/the/subproof.pxsubproof

# verify a subproof for a path
./proofable-cli verify subproof path/to/the/data -s path/to/the/subproof.pxsubproof

# verify a subproof for a path and output the subproof's Graphviz Dot Graph
./proofable-cli verify subproof path/to/the/data -s path/to/the/subproof.pxsubproof -d path/to/output/the/dot/graph.dot

Binaries

Dev (cutting-edge) binaries

Prd (released) binaries

Development

Run installation scripts locally

FAQ

Error: “proofable-cli_darwin_amd64” cannot be opened because the developer cannot be verified

Mac Cannot Open Issue

Use the following command to fix:

xattr -d com.apple.quarantine path/to/proofable-cli_darwin_amd64