Trustblock CLI

Trustblock CLI is a user-friendly command-line utility that helps you interact with Trustblock and publish audit reports. Refer to the Trustblock CLI documentation for more detailed information.

Installation

Install Trustblock CLI using Cargo:

bash cargo install trustblock-cli

Usage

To see available subcommands, use the help flag:

bash trustblock help

For more information and help with specific subcommands, use the --help flag:

bash trustblock <subcommand> --help

Setup

Before publishing an audit, run the following command to initialize the ~/.trustblock/.env file:

bash trustblock init

Next, add your private key from the whitelisted wallet and JWT to the ~/.trustblock/.env file. You can obtain an API key by navigating to your profile and clicking the "Edit my profile" button on the Trustblock website after authentication.

Note: Trustblock CLI can still be used without adding data to the .env file, as long as the required information is passed as arguments.

Audit Publishing

To publish an audit, run the following command:

bash trustblock publish-audit -a audit.json -r ./Audit_Report.pdf -n Project_Name

You can obtain an example audit.json file from https://github.com/Trustblock-Inc/trustblock-cli/blob/main/src/data/audit.json. You should fill in the fields with the appropriate information from your audit.

Optional flags for adding project information:

bash -t, --project-twitter-link -g, --project-github-link -w, --project-website-link -c, --project-contact-email

To include auth token and private key:

bash -k, --auth-token -p, --private-key

To also publish to Smart Contracts, add the --publish-sc flag:

bash -s, --publish-sc

Commands

Audit Parameters

Use these parameters to modify audit.json

Status

Tags

Chains