In this guide, you’ll learn how to use our command-line tool designed to streamline your development workflow with the Blnk Ledger.

The Blnk CLI is a command-line interface that allows you to interact directly with your Blnk Ledger or any remote instance of a Blnk Ledger from your terminal. You get access to a suite of commands to read, manage and configure your ledger efficiently.

Prerequisites

To use the Blnk CLI, ensure you have the following:

  1. Node.js and npm. If you don’t have them, visit the Node official website to download.
  2. A running instance of Blnk

If you haven’t installed the Blnk Ledger, read our installation guide to get started.

Installation

To install the Blnk CLI tool, run the following command in your terminal.

bash
npm i -g blnk-cli

This installs the Blnk CLI globally on your system, allowing you to access it from anywhere.

Confirm installation

To confirm that you have installed it, run the following command in your terminal.

bash
blnk --version

This commmand should display the installed version of the Blnk CLI.

Basic Usage

Here are some basic commands to get you started. Ensure your Blnk Ledger is running before you start running these commands.

1

Connect to a different instance

bash
blnk connect <url>

This command allows the Blnk CLI to connect and manage a different instance outside of your machine. It is unprotected, however.

2

Securely connect to a different instance

bash
blnk connect-secure <url> <token>

This command ensures a secure connection to a different instance using its secret key (token) as authentication.

3

View all ledgers

bash
blnk view-ledgers

This command displays a table of all the ledgers in your Blnk Ledger.

4

View all balances

bash
blnk view-balances

This command displays a table of all the ledger balances in your Blnk Ledger.

5

View all transactions

bash
blnk view-transactions

This command displays a table of all the transactions in your Blnk Ledger.

6

Help manual

bash
blnk help

This command displays a list of all the commands and their function. To find the help manual for a particular command, run the following command:

bash
blnk help [command]

See also

Blnk Plugins

Explore custom additional features built on top of your ledger

Need help?

Are you stuck? Do you have a question that isn’t answered in this doc? Have you run into a problem you can’t solve? Want to file a bug report?

Join our Discord server and share your questions/thoughts with other developers building financial applications like you.

Was this page helpful?