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.
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
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 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
Prompts you to enter the information required to create a new ledger entity on the server’s database
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
minka circle unlink <handle> [signer_handle]
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 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:
This input will be processed as:
Handling Spaces
Any spaces before or after a comma are automatically trimmed. For instance:
This input will also be processed as:
By following this format, you ensure that labels are accurately parsed and utilised.