Profiles

Learn how to configure, manage, and interact with multiple key profiles in the Supra CLI.

What Are CLI Key Profiles?

Profiles in the Supra CLI are configurations that allow you to manage multiple key pairs within your environment. Each profile is tied to a unique public/private key pair and serves as an identity for various operations, such as running a validator node, managing accounts, or accessing specific resources. Profiles can be created, activated, imported, or removed as needed, providing flexibility and security when working with different roles or use cases.


CLI Commands for Profiles

Here's how to use the Supra CLI commands to work with profiles:

Not all CLI commands are listed here. Use the --help option to see the full list.

List Profiles

View all available profiles in your current environment:

supra key list-profile [OPTIONS]

Additional Options:

  • [OPTIONS] = -r: Reveal secret keys to screen

Example:

supra key list-profile

Result:

Active a Profile

Set a specific profile as active, so it is used for subsequent CLI commands:

Additional Options:

  • [OPTIONS] = -f: Run without password prompt but read from the `NODE_OPERATOR_KEY_PASSWORD` environment variable.

  • <NAME> = Name of profile to activate

Example:

Result:

Generate a Profile

Create a new profile with a fresh key pair:

Additional Options:

  • [OPTIONS] = -f: Run without password prompt but read from the `NODE_OPERATOR_KEY_PASSWORD` environment variable.

  • <NAME> = Name of the profile to generate

Example:

Result:

Import an Existing Profile

Add an existing profile using its private key:

Additional Options:

  • [OPTIONS] = -f: Run without password prompt but read from the `NODE_OPERATOR_KEY_PASSWORD` environment variable.

  • <NAME> = Name of the profile for the newly imported key

  • <PRIVATE_KEY> = A private key is a secret code that secures and controls access to a blockchain account.

Example:

Result:

Delete Profile

Delete an existing profile from your environment:

Additional Options:

  • <NAME> = Name of the profile to be removed

Example:

Result:

Last updated