CLI
This guide will walk you through the basic functions to get you started with the Veramo CLI.
important
The CLI tool is currently only supported on MACOS and Linux systems. Windows support is coming soon.
The core API of Veramo is exposed by the CLI tool. All major functions can be executed locally using the CLI tool.
First, we need to install the CLI globally:
note
๐ Currently, the install is a bit noisy. We are working to improve this.
To check the CLI has installed, run:
Basics
Create an identifier, a credential, and learn where everything is stored.
Methods
To see all the commands run:
Where is the data stored?
By default, the first time you run the CLI tool, a local agent will be created, and this will create a number of files on your computer.
Create configuration
You can also use a per-project configuration or specify a configuration file with each command.
If the current folder contains an agent.yml
configuration file, it will be used instead of the .veramo/agent.yml
path.
Alternatively, you can specify a config file with each command using the --config /path/to/your/config.yml
option. This will be used instead of a per-project or default configuration file.
You can create a configuration file in the current folder by running:
This will create an agent.yml
file that will get used next time you invoke a CLI command in this folder.
By default, the database files are created in the same folder as the config file.
Create a DID
The first thing you will want to do is create an identifier using the did create
command. This command will create a DID and store the keys in a local database.
Resolve a DID
You can resolve any DID using the resolver:
Create a verifiable credential
Now let's create your first credential with Veramo using the DID you just created as both issuer and subject. This will be a self-signed credential. Follow the command prompt after running:
Go Explore
Run the explorer to open a commander terminal that shows you everything in your database!
Advanced
Coming soon: We will cover more advanced features such as selective disclosure, presentations, and messages.