Overview

Metalo is a command line tool to interact with MetaLocker and derived products.

Global Options

--debug               if true, enable debug mode (default: false)
--server value        MetaLocker url, i.e. https+insecure://127.0.0.1:4000 (default: "https+insecure://127.0.0.1:4000") [$METASERVER]
--user value          account email address [$METAUSER]
--password value      account password [$METAPASS]
--admin-key value     (for admin operations) API key [$ADMKEY]
--admin-secret value  (for admin operations) API secret [$ADMSECRET]
--api-key value       Account API key [$APIKEY]
--api-secret value    Account API secret [$APISECRET]
--help, -h            show help (default: false)
--version, -v         print the version (default: false)

Instance

Use --server option to specify the base URL of the MetaLocker instance.

Example:

metalo --server https://my.metalocker.tech

If you don’t specify the instance URL, metalo will try connecting with the local development instance at https+insecure://127.0.0.1:4000. Only use https+insecure: protocol when connecting to instances with self-signed certificates.

User Credentials

We recommend using METAUSER and METAPASS environment variables to pass the account credentials.

Example:

METAUSER=test@example.com METAPASS=paSSw0rd metalo --server https://my.metalocker.tech

Alternatively, you may pass the credentials as arguments (not recommended for the password):

metalo --user test@example.com --password paSSw0rd --server https://my.metalocker.tech

Use account credentials aren’t provided, metalo will prompt you to enter them in interactive mode.

API Keys

You may connect to MetaLocker using API access keys:

APIKEY=<key-value> APISECRET=<secret-value> metalo --server https://my.metalocker.tech

or, alternatively:

metalo --api-key <key-value> --api-secret <secret-value> --server https://my.metalocker.tech

Admin Keys

For administrative operations, you may also connect to MetaLocker using admin keys:

ADMKEY=<key-value> ADMSECRET=<secret-value> metalo --server https://my.metalocker.tech

or, alternatively:

metalo --adm-key <key-value> --adm-secret <secret-value> --server https://my.metalocker.tech

Please note that account specific operations are not supported with admin keys.

Command Line Help

If unsure, run the following command to see more instructions:

metalo --help
NAME:
   metalo - A CLI tool for MetaLocker

USAGE:
   metalo [global options] command [command options] [arguments...]

VERSION:
   0.0.1

COMMANDS:
   register                   register new user
   new-identity               create new identity and add to user account
   import-locker              import locker
   import-identity            import new identity to existing user
   add-persona                add new persona to existing user
   create-locker              create new locker definition
   print-account              print account JSON
   print-account-chart        print account chart
   delete-account             delete account
   change-email               change account email
   change-password            change account password
   recover-account            recover account
   recover-account-with-slrc  recover account with SLRC code
   prop                       options for account property management
   access-key                 options for access key management
   sub-account                options for sub-account management
   store-dataset              store data set
   store-datasets             store all data sets in the given folder
   share-dataset              share data set
   get-dataset                get data set
   revoke-lease               revoke data set's lease
   list-lockers               list all account lockers
   purge-data-assets          purge deleted data assets
   list-records               list all ledger records
   sync-wallet                sync local data wallet with the ledger
   export-wallet              export data wallet
   export-ledger              export MetaLocker ledger into the given directory
   new-asset                  generate new asset. If file path provided as a parameter, generate a digital asset definition
   supported-data-types       list supported data types
   sample-crypto              generate sample crypto material for MetaLocker configuration
   import-ledger              import MetaLocker ledger data from the given directory
   export-accounts            export MetaLocker accounts into the given directory
   import-accounts            import MetaLocker accounts from the given directory
   account-state              update account state for the given ID (email or DID)
   help, h                    Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --debug               if true, enable debug mode (default: false)
   --server value        MetaLocker url, i.e. https+insecure://127.0.0.1:4000 (default: "https+insecure://127.0.0.1:4000") [$METASERVER]
   --user value          account email address [$METAUSER]
   --password value      account password [$METAPASS]
   --admin-key value     (for admin operations) API key [$ADMKEY]
   --admin-secret value  (for admin operations) API secret [$ADMSECRET]
   --api-key value       Account API key [$APIKEY]
   --api-secret value    Account API secret [$APISECRET]
   --help, -h            show help (default: false)
   --version, -v         print the version (default: false)