References

CLI reference


The Minka CLI provides a set of commands to manage records for your ledger and bridges. You can install it globally from NPM to use the referenced commands from your Command Line Tool.

# Using npm
npm install -g @minka/cli
# Using yarn
yarn global add @minka/cli

This is only a reference document with the commands you can use and the options available, if you want some detailed examples for different scenarios please refer to:

Main Synopsis

minka <key-concept> <command> [parameters] [options] 

If you want to read more about our key concepts, please refer to this page. Those core concepts include: Signer, Symbol, Wallet, Intent, Effect and Bridge

Table of Contents


authentication

CLI provides a set of commands that allow users to login and logout. See About Authorization for more details.

Commands

minka server

The minka server <commands> are used to manage the server connection that is going to be used from your CLI. Most of the commands referenced below requires a server connection.

Available Commands

minka server connect

Prompts you to enter the URL of a Ledger’s API to connect. If the URL is a valid server instance, you will receive a message indicating that the connection was successfull.

minka server disconnect

Disconnect from a remote server after confirmation.

minka server show

Outputs the current server you are connected to, if any.

minka server proxy

Launches local proxy server that takes user's requests, adds hash and signer signature to the request body or headers and forwards them to the Ledger. This is useful for simplifying the process of sending requests to Ledger API from Postman or other tools, as the proxy server handles all the details of hashing and signing the request, and the user only needs to be focused on the data they want to send.


minka ledger

The minka ledger <commands> are used to manage the ledger instances on the server’s database.

Available commands

minka ledger login

Prompts you to select a signer to login. The Authorization header of requests is set with a JWT signed by the authenticated signer. Remote signers are shown if you are connected with a ledger instance, otherwise only device signers are available.

minka ledger logout

Remove user from context and stops sending Authorization header with signed JWT.

minka ledger create [handle] [options]

Prompts you to enter the information required to create a new ledger entity on the server’s database

  • Parameters

    [handle]

    Handle of the ledger to be created, if not specified will be prompted.

  • Options

    -y, --yes

    Skip prompting optional data. Useful when you want to speed up ledger creation and configuration with default values satisfies.

minka ledger select

Allows you to select a ledger to operate with. You must have access granted to read the selected ledger in order to use it.

minka ledger show

Outputs the active ledger details, if any.

minka ledger update

Prompts you to update the information of active ledger.

minka ledger sign

Sign the ledger loaded in context using the provided signatures.

minka ledger list

Show list of ledgers.


minka signer

The minka signer <commands> are used to generate and manage local and remote signing keys.

Available commands

minka signer create [handle] [options]

Prompts you to enter the information required to input a key pair and store it to the server’s database or locally.

  • Parameters

    [handle]

    Handle of the signer to be created, if not specified will be prompted.

  • Options

    --no-secret

    Skip prompting secret key when manually inputing a key pair. Useful when you want to only store public key as a signer in the ledger.

    -i, --import

    Skip prompt of key pair input method and directly use “Import” instead

minka signer import [filename]

Prompts you to enter the information required to import a PEM file into a signer

  • Parameters

    [filename]

    Path of the file to import, if not specified will be prompted.

minka signer export [handle]

Prompts you to enter the information required to export a signer into a PEM file. Defaults to local signer, if not found, tries to load from connected ledger if any.

  • Parameters

    [handle]

    Handle of the signer to export, if not specified will be prompted.

  • Options

    -r, --remote

    Directly export the signer from connected ledger instead of trying to export from device signers.

minka signer show <handle> [options]

Shows the details of the signer whose handle is <handle>

  • Parameters

    <handle>

    The handle of the signer to be queried

  • Options

    -s, --secret

    Show the secret key of the signer, if encrypted the password to decrypt will be prompted

    -r, --remote

    Query a remote signer instead of a device signer

minka signer update <handle>

  • Parameters

    <handle>

    The remote handle of the signer to be updated

minka signer list [options]

Shows a list of signers

  • Options

    -p <index>, --page <index>

    Page index to load, 0 based. Defaults to 0

    -l <limit>, --limit <limit>

    Max number of items per page. Defaults to 10

    -r, --remote

    Query remote signers instead of device signers

    -i, --interactive

    Allows interactive navigation in case there are multiple pages

minka signer push

Upload a device signer to remote server

minka signer sign <handle>

Sign a signer using the provided signatures


minka symbol

The minka symbol <commands> are used to manage the storable symbols on the server’s database.

Available commands

minka symbol create

Prompts you to enter the information required to create a new symbol.

minka symbol show <handle>

Shows the details of the symbol whose handle is <handle>

  • Parameters

    <handle>

    The remote handle of the symbol to be queried

minka symbol update [options] <handle>

Prompts you with the information required to update the symbol whose handle is <handle>

  • Parameters

    <handle>

    The remote handle of the symbol to be updated

minka symbol list [options]

Shows a list of symbols

  • Options

    -p <index>, --page <index>

    Page index to load, 0 based. Defaults to 0

    -l <limit>, --limit <limit>

    Max number of items per page. Defaults to 10

    -i, --interactive

    Allows interactive navigation in case there are multiple pages

minka symbol sign <handle>

Sign a symbol using the provided signatures


minka wallet

The minka wallet <commands> are used to manage and query the wallets and its balances on the server’s database.

Available commands

minka wallet create

Prompts you to enter the information required to create a new wallet.

minka wallet show <handle>

Shows the details of the wallet whose handle is <handle>

  • Parameters

    <handle>

    The remote handle of the wallet to be queried

minka wallet update [options] <handle>

Prompts you with the information required to update the wallet whose handle is <handle>

  • Parameters

    <handle>

    The remote handle of the wallet to be updated

minka wallet list [options]

Shows a list of wallets

  • Options

    -p <index>, --page <index>

    Page index to load, 0 based. Defaults to 0

    -l <limit>, --limit <limit>

    Max number of items per page. Defaults to 10

    -i, --interactive

    Allows interactive navigation in case there are multiple pages

minka wallet balances <handle>

Shows the symbols and balances held by the wallet whose handle is <handle>

  • Parameters

    <handle>

    The remote handle of the wallet to be queried

minka wallet domains <handle>

Fetches domains corresponding to the wallet whose part of the handle is <handle>

  • Parameters

    <handle>

    The remote partial handle of the wallet to be queried

minka wallet limits <handle>

Show wallet limits corresponding to the wallet whose the handle is <handle>

  • Parameters

    <handle>

    The remote handle of the wallet to be queried

minka wallet drop <handle>

Drop a wallet corresponding to the wallet whose the handle is <handle>

  • Parameters

    <handle>

    The remote handle of the wallet to be queried

minka wallet sign <handle>

Sign a wallet using the provided signatures whose the handle is <handle>


minka intent

The minka intent <commands> are used to manage and query the intents creates on the server’s database.

Available commands

minka intent create

Prompts you to enter the information required to start a new intent.

minka intent show <handle>

Shows the details for the intent whose handle is <handle>

  • Parameters

    <handle>

    The remote handle of the intent to be updated

minka intent sign <handle>

Prompts you with the information required to add signatures to the intent whose handle is <handle>

  • Parameters

    <handle>

    The remote handle of the intent to be signed

minka intent list [options]

Shows a list of intents

  • Options

    -p <index>, --page <index>

    Page index to load, 0 based. Defaults to 0

    -l <limit>, --limit <limit>

    Max number of items per page. Defaults to 10

    -i, --interactive

    Allows interactive navigation in case there are multiple pages


minka effect

The minka effect <commands> are used to manage the effects on the server’s database.

Available commands

minka effect create

Prompts you to enter the information required to create a new effect.

minka effect show <handle>

Shows the details of the effect whose handle is <handle>

  • Parameters

    <handle>

    The remote handle of the effect to be queried

minka effect update [options] <handle>

Prompts you with the information required to update the effect whose handle is <handle>

  • Parameters

    <handle>

    The remote handle of the effect to be updated

  • Options

    -p <index>, --page <index>

    Page index to load, 0 based. Defaults to 0

    -l <limit>, --limit <limit>

    Max number of items per page. Defaults to 10

    -i, --interactive

    Allows interactive navigation in case there are multiple pages

minka effect list [options]

Shows a list of effects

  • Options

    -p <index>, --page <index>

    Page index to load, 0 based. Defaults to 0

    -l <limit>, --limit <limit>

    Max number of items per page. Defaults to 10

    -i, --interactive

    Allows interactive navigation in case there are multiple pages

minka effect sign <handle>

Prompts you with the information required to add signatures to the effect whose handle is <handle>

  • Parameters

    <handle>

    The remote handle of the intent to be signed


minka bridge

The minka bridge <commands> are used to manage the bridges stored on the server’s database and start a local bridge useful for testing.

Available commands

minka bridge start [options]

Starts a local bridge for testing

  • Option

    -p <port> --port <port>

    Number of the local port to be used. Defaults to 4042

minka bridge activate <handle>

Mark as active the bridge in the ledger. This will speed up redelivery of events that failed to deliver while the bridge was offline.

You can read more in the “About bridges - Retries for requests from ledger to bridge” page

  • Parameters

    <handle>

    The remote handle of the bridge to be activated

minka bridge create

Prompts you to enter the information required to create a new bridge.

minka bridge show <handle>

Shows the details of the bridge whose handle is <handle>

  • Parameters

    <handle>

    The remote handle of the bridge to be queried

minka bridge update [options] <handle>

Prompts you with the information required to update the bridge whose handle is <handle>

  • Parameters

    <handle>

    The remote handle of the bridge to be updated

  • Options

    -p <index>, --page <index>

    Page index to load, 0 based. Defaults to 0

    -l <limit>, --limit <limit>

    Max number of items per page. Defaults to 10

    -i, --interactive

    Allows interactive navigation in case there are multiple pages

minka bridge list [options]

Shows a list of bridges

  • Options

    -p <index>, --page <index>

    Page index to load, 0 based. Defaults to 0

    -l <limit>, --limit <limit>

    Max number of items per page. Defaults to 10

    -i, --interactive

    Allows interactive navigation in case there are multiple pages

minka bridge sign <handle>

Prompts you with the information required to add signatures to the bridge whose handle is <handle>

  • Parameters

    <handle>

    The remote handle of the intent to be signed

minka bridge certify [options]

Run certification tests

  • Options

    -p <index>, --page <index>

    Page index to load, 0 based. Defaults to 0

    -l <limit>, --limit <limit>

    Max number of items per page. Defaults to 10

    -i, --interactive

    Allows interactive navigation in case there are multiple pages

minka bridge activate <handle>

Mark as active the bridge in the ledger corresponding to the <handle>. This will speed up redelivery of events that failed to deliver while the bridge was offline.

  • Parameters

    <handle>

    The remote handle of the intent to be signed

minka bridge init [options] <handle>

Initialise a local bridge project whose handle is <handle>

  • Parameters

    <handle>

    The remote handle of the bridge to be updated

  • Options

    -p <index>, --page <index>

    Page index to load, 0 based. Defaults to 0

    -l <limit>, --limit <limit>

    Max number of items per page. Defaults to 10

    -i, --interactive

    Allows interactive navigation in case there are multiple pages


minka circle

The minka circle <commands> are used to manage the storable circles on the server’s database.

Available commands

minka circle create

Prompts you to enter the information required to create a new circle.

minka circle show <handle>

Shows the details of the circle whose handle is <handle>

  • Parameters

    <handle>

    The remote handle of the circle to be queried

minka circle update [options] <handle>

Prompts you with the information required to update the circle whose handle is <handle>

  • Parameters

    <handle>

    The remote handle of the circle to be updated

  • Options

    -p <index>, --page <index>

    Page index to load, 0 based. Defaults to 0

    -l <limit>, --limit <limit>

    Max number of items per page. Defaults to 10

    -i, --interactive

    Allows interactive navigation in case there are multiple pages

minka circle list [options]

Shows a list of circles

  • Options

    -p <index>, --page <index>

    Page index to load, 0 based. Defaults to 0

    -l <limit>, --limit <limit>

    Max number of items per page. Defaults to 10

    -i, --interactive

    Allows interactive navigation in case there are multiple pages

minka circle assign <handle> [signer_handle]

Prompts you to enter the information required to assign a new signer to a circle.

minka circle signers [options] <handle>

Shows a list of signer circle links

  • Options

  • Parameters

    <handle>

    The remote handle of the circle to be updated

Prompts you with the information required to unlink a signer from a circle whose handle is <handle>

  • Parameters

    <handle>

    The remote handle of the circle to be updated

minka circle sign <handle>

Prompts you with the information required to add signatures to the circle whose handle is <handle>

  • Parameters

    <handle>

    The remote handle of the intent to be signed


minka anchor

The minka anchor <commands> are used to manage the storable anchors on the server’s database.

Available commands

minka anchor create

Prompts you to enter the information required to create a new anchor. One of the prompts is labels

minka anchor show <handle>

Shows the details of the anchor whose handle is <handle>

  • Parameters

    <handle>

    The remote handle of the circle to be queried

minka anchor update [options] <handle>

Prompts you with the information required to update the anchor whose handle is <handle>

  • Parameters

    <handle>

    The remote handle of the circle to be updated

  • Options

    -p <index>, --page <index>

    Page index to load, 0 based. Defaults to 0

    -l <limit>, --limit <limit>

    Max number of items per page. Defaults to 10

    -i, --interactive

    Allows interactive navigation in case there are multiple pages

minka anchor list [options]

Shows a list of anchors

  • Options

    -p <index>, --page <index>

    Page index to load, 0 based. Defaults to 0

    -l <limit>, --limit <limit>

    Max number of items per page. Defaults to 10

    -i, --interactive

    Allows interactive navigation in case there are multiple pages

minka anchor sign <handle>

Prompts you with the information required to add signatures to the anchor whose handle is <handle>

  • Parameters

    <handle>

    The remote handle of the intent to be signed

minka anchor drop <handle>

Drop an anchor whose handle is <handle>

  • Parameters

    <handle>

    The remote handle of the intent to be signed


minka policy

The minka policy <commands> are used to manage the policies on the server’s database.

Available commands

minka policy create

Prompts you to enter the information required to create a new policy.

minka policy show <handle>

Shows the details of the policy whose handle is <handle>

  • Parameters

    <handle>

    The remote handle of the policy to be queried

minka policy update [options] <handle>

Prompts you with the information required to update the policy whose handle is <handle>

  • Parameters

    <handle>

    The remote handle of the policy to be updated

  • Options

    -p <index>, --page <index>

    Page index to load, 0 based. Defaults to 0

    -l <limit>, --limit <limit>

    Max number of items per page. Defaults to 10

    -i, --interactive

    Allows interactive navigation in case there are multiple pages

minka policy list [options]

Shows a list of policies

  • Options

    -p <index>, --page <index>

    Page index to load, 0 based. Defaults to 0

    -l <limit>, --limit <limit>

    Max number of items per page. Defaults to 10

    -i, --interactive

    Allows interactive navigation in case there are multiple pages

minka policy activate <handle>

Activates an access policy, making it enforceable and allowing it to control access permissions within your ledger.

  • Parameters

    <handle>

    The remote handle of the policy to be activated

Only policies with schema: 'access' can be activated. The policy must be in created or inactive status to be activated.

minka policy deactivate <handle>

Deactivates an access policy, temporarily disabling it while keeping the policy definition intact for future reactivation.

  • Parameters

    <handle>

    The remote handle of the policy to be deactivated

Only policies with schema: 'access' can be deactivated. The policy must be in active status to be deactivated. Deactivation is reversible.

minka policy sign <handle>

Prompts you with the information required to add signatures to the policy whose handle is <handle>

  • Parameters

    <handle>

    The remote handle of the intent to be signed


minka config

The minka config <commands> are used to manage configurations at global, server and ledger levels.

Available commands

minka config set [options] <path> <value>

Sets a configuration

  • Options

    -g, --global

    Stores the configuration globally

    -s , --server [custom]

    Stores the configuration at server level

    -l, --ledger [custom]

    Stores the configuration at ledger level

  • Parameters

    <path>

    The path for the config set

    <value>

    The value to be set

minka config unset [options] <path>

Unsets a configuration

  • Options

    -g, --global

    Removes the configuration globally

    -s , --server [custom]

    Removes the configuration at server level

    -l, --ledger [custom]

    Removes the configuration at ledger level

  • Parameters

    <path>

    The path for the config unset

minka config show [options] <path>

Shows a configuration

  • Options

    -g, --global

    Removes the configuration globally

    -s , --server [custom]

    Removes the configuration at server level

    -l, --ledger [custom]

    Removes the configuration at ledger level

  • Parameters

    <path>

    The path for the config show


minka layout

The minka layout <commands> are used to manage ledger layouts.

Available commands

minka layout show [options]

Prompts you to select a layout and input the required data to visualize a layout

  • Options

    -r, --raw

    Prints layout with placeholder variables

    --verbose

    Prints the layout structure as JSON

minka layout apply

Applies a layout to a ledger

minka layout sync

Sync records of a layout to a ledger

minka layout diff [options]

Prints the changes between a layout and the active ledger using the layout as the source of truth.

  • Options

    -s=<recordType, ...> , --select=<recordType, ...>

    Selects specific record types to be shown


How to…

Handle labels

Labels serve as an additional input field, similar to fields like handle or custom. In the respective record Create Command, one of the steps in the CLI provides an option to input labels.

Adding Multiple Labels

To specify multiple labels, separate them with a comma. For example:

preferred,listed,active

This input will be processed as:

['preferred', 'listed', 'active']

Handling Spaces

Any spaces before or after a comma are automatically trimmed. For instance:

preferred,   listed, active

This input will also be processed as:

['preferred', 'listed', 'active']

By following this format, you ensure that labels are accurately parsed and utilised.

On this page

Main Synopsis
Table of Contents
authentication
Commands
minka server
Available Commands
minka server connect
minka server disconnect
minka server show
minka server proxy
minka ledger
Available commands
minka ledger login
minka ledger logout
minka ledger create [handle] [options]
minka ledger select
minka ledger show
minka ledger update
minka ledger sign
minka ledger list
minka signer
Available commands
minka signer create [handle] [options]
minka signer import [filename]
minka signer export [handle]
minka signer show <handle> [options]
minka signer update <handle>
minka signer list [options]
minka signer push
minka signer sign <handle>
minka symbol
Available commands
minka symbol create
minka symbol show <handle>
minka symbol update [options] <handle>
minka symbol list [options]
minka symbol sign <handle>
minka wallet
Available commands
minka wallet create
minka wallet show <handle>
minka wallet update [options] <handle>
minka wallet list [options]
minka wallet balances <handle>
minka wallet domains <handle>
minka wallet limits <handle>
minka wallet drop <handle>
minka wallet sign <handle>
minka intent
Available commands
minka intent create
minka intent show <handle>
minka intent sign <handle>
minka intent list [options]
minka effect
Available commands
minka effect create
minka effect show <handle>
minka effect update [options] <handle>
minka effect list [options]
minka effect sign <handle>
minka bridge
Available commands
minka bridge start [options]
minka bridge activate <handle>
minka bridge create
minka bridge show <handle>
minka bridge update [options] <handle>
minka bridge list [options]
minka bridge sign <handle>
minka bridge certify [options]
minka bridge activate <handle>
minka bridge init [options] <handle>
minka circle
Available commands
minka circle create
minka circle show <handle>
minka circle update [options] <handle>
minka circle list [options]
minka circle assign <handle> [signer_handle]
minka circle signers [options] <handle>
minka circle unlink <handle> [signer_handle]
minka circle sign <handle>
minka anchor
Available commands
minka anchor create
minka anchor show <handle>
minka anchor update [options] <handle>
minka anchor list [options]
minka anchor sign <handle>
minka anchor drop <handle>
minka policy
Available commands
minka policy create
minka policy show <handle>
minka policy update [options] <handle>
minka policy list [options]
minka policy activate <handle>
minka policy deactivate <handle>
minka policy sign <handle>
minka config
Available commands
minka config set [options] <path> <value>
minka config unset [options] <path>
minka config show [options] <path>
minka layout
Available commands
minka layout show [options]
minka layout apply
minka layout sync
minka layout diff [options]
How to…
Handle labels
Adding Multiple Labels
Handling Spaces