Affinidi CLI

An easy-to-use command line interface to manage your projects and configurations to integrate your applications into the Affinidi Trust Network.

GitHub Repository

Affinidi CLI is a developer tool that allows you to easily manage your projects and integrate with Affinidi services using the command line. It provides developers with simple commands to manage their resources, improving their experience when interacting with our different services.

It is an open-source project published on  GitHub. It was built using the Open CLI Framework (oclif) to easily implement CLI commands following their patterns.

You can read our contribution guide to learn more about how you can contribute to the project.

Installing Affinidi CLI

To install Affinidi CLI, run the following command:

npm install -g @affinidi/cli

It requires that you have NodeJS (version 18.0 and above) installed on your machine.

Working with Affinidi CLI

To start working with Affinidi CLI and manage your projects and configuration, you have to authenticate first using the following command:

affinidi start

If you received an error message about a session expired, just run the same command to refresh your session.

Affinidi CLI Command Structure

Commands in Affinidi CLI have the following structure:

affinidi <topic> <command> [flags]
  1. All commands start with the keyword affinidi.

  2. Topics typically correspond to Affinidi services or domains.

  3. Commands correspond to the actions to perform.

  4. Flags are a way to provide the parameters required by the command.

  5. Use affinidi help <topic|command> to show the helpful details.

Explore the Affinidi CLI documentation to learn how to use the CLI and its available commands to manage your projects and configurations.