passport-scope-cli
v1.1.9
Published
Passport management tool
Downloads
177
Readme
Passport Scope CLI Tool
The Passport Scope CLI tool is a command-line interface for managing scopes within the Passport Protocol. It allows you to create new scopes, generate key pairs, and interact with the Passport Protocol nodes.
Installation
Before using the CLI, ensure you have Node.js and pnpm
installed. Install pnpm
globally using npm
:
npm install -g pnpm
Then, install the CLI tool globally using npm or pnpm
:
npm install -g passport-scope-cli
pnpm install -g passport-scope-cli
Usage
To create and manage scopes, the CLI requires a public/private key pair.
The CLI provides the following commands:
Generate Keys
To generate a public/private key pair, use the generate-keys
command with the --name
option to specify the name of the key pair.
passport-scope generate-keys --name <key-pair-name>
For example, to generate a key pair named passport, which generates a passport_priv.pem and passport_pub.pem file:
passport-scope generate-keys --name passport
Create a New Scope
To create a new scope, use the create
command with the required --config-path
option to specify the path of the scope configuration content. Optionally, you can provide the --private-key
path and enable verbose logging with -v
or --verbose
.
passport-scope create --config-path <path-to-config> [--private-key <path-to-private-key>] [-v]
For example, to create a scope with a specific configuration and private key, if you do not pass a private key path, the CLI will prompt you to generate a keypair.
passport-scope create --config-path ./test.json --private-key ./passport_priv.pem --verbose true