CLI

Access to the Bloq CLI is through bcl.

Jump to:

Usage: bcl <COMMAND>

The following commands are available:

Command
Description

client-keys

Manage Bloq client key(s)

client-token

Generate new client token(s)

clusters

Manage Bloq node clusters

conf

Manage configuration

events

Get Bloq Events

help

Display help for bcl

login

Login to Bloq account

logout

Clear local user data

nodes

Manage Bloq nodes

profile

Retrieve user profile

signup

Setup a new Bloq account

status

Get Bloq services status

update-password

Update user password

verify

Verify Bloq account and complete signup process

Client Keys

Client Keys are required to access Bloq services and generate Access and Refresh tokens.

The following operations are supported within bcl client-keys <OPERATION>

Operation
Description

create

Create a new client-key

list (default)

Get list of client-keys

remove

Remove a client-key

Create Client Keys

The bcl client-keys create operation enables users to create a Client Key ID and Client Key Secret pair.

A user must create a client-key in order to use Bloq services.

WARNING

Make sure to save your Client Key Secret in a secure location. Secrets are not viewable in the future. Upon Client Key Secret generation, the secret is automatically copied to the clipboard for easy storage.

List Client Keys

The bcl client-keys list operation enables users to list existing keys by Client Key ID. Client Key Secret are not viewable.

Remove Client Keys

The bcl client-keys remove operation enables users to remove a Client Key ID and Client Key Secret pair.

Client Token

The bcl client-token command creates a clientAccessToken and refreshToken for use with Bloq services.

TIP

A client-key pair must be created prior to creating a clientAccessToken or refreshToken. Use the bcl client-keys command if client-keys do not currently exist.

A clientAccessToken is a short-lived (1 hr) token that is required by applications to access Bloq services (Nodes, etc).

A refreshToken is a longer term (1 year) token that enables your application to request a new clientAccessToken to the authentication server. When the clientAccessToken expires, the refreshToken will let you obtain a new clientAccessToken. The refreshToken is renewed every time a new clientAccessToken is requested.

WARNING

Make sure to save your clientAccessToken and refreshToken in a secure location. Upon token generation, the they will no longer be possible to access again.

Clusters

The bcl clusters <METHOD> <OPTIONAL FLAGS> command enables the user to interact with and manage their registered Bloq clusters. The <METHOD> is the clusters method that can be invoked.

Valid <METHOD> options are:

  • chains

  • info

  • list

  • remove

  • services

Optional Flags

The following are the list of optional flags for the bcl clusters command:

Optional Flag
Description

-a, --all

List all clusters

-c, --capacity

Specify the node capacity for the cluster (default: 2)

-i, --clusterId

Specify the cluster to interact with

-s, --serviceId

Specify a specific clusters service

-t, --authType

Speciy the authentication type for clusters (default: basic) Options include basic, jwt

TIP

bcl clusters methods do not require any additional flags. If more input is required, the client will prompt you for that information upon command execution.

Conf

Set Client Keys

In order to reload your previous Client Keys to the CLI, use the following commands:

bcl conf --key clientId --value <Previous_clientId>

bcl conf --key clientSecret --value <Previous_clientSecret>

Retrieve Account Access Token

To retrieve the Account Access Token that is generated upon bcl login, use the following command:

bcl conf accessToken

Events

The bcl events command provides a history of the most recent events.

Use the -s=<service> flag to filter events by services.

Valid options for <service> are:

  • accounts

  • nodes

Help

The bcl help command provides the help screen.

Login

The bcl login -u <Account ID> command authenticates and logs the user into the CLI.

The Account ID is contained within the user signup confirmation email.

Logout

The bcl logout command logs the user out of the CLI and removes any local user data from the CLI.

Nodes

The bcl nodes <METHOD> <OPTIONAL FLAGS> command enables the user to access Bloq Nodes services and manage their registered Bloq Nodes. The <METHOD> is the Nodes service method that can be invoked.

Valid <METHOD> options are:

  • chains

  • info

  • list

  • remove

  • services

Optional Flags

The following are the list of optional flags for the bcl nodes command:

Optional Flag
Description

-a, --all

List all nodes

-i, --nodeId

Specify the node to interact with

-s, --serviceId

Specify an exact service encompassed by Bloq Nodes

-t, --authType

Speciy the authentication type for a node (default: basic) Options include basic, jwt

TIP

bcl nodes methods do not require any additional flags. If more input is required, the client will prompt you for that information upon command execution.

Profile

The bcl profile command provides information about the user including:

  • Account ID

  • Display Name

  • Email Address

  • Verification Status

Status

The bcl status command provides the online status of Bloq services.

Update-Password

The bcl update-password command provides the ability for the user to change their existing password associated with their Bloq account.

Last updated