Prerequisites
Before using the CLI, the following are needed:- An account and instance.
- A private key to authenticate with the API. Generate one in the Integrations section of the dashboard.
Installation
The CLI requires Node JS to be installed. Once ready, run the following command to install the CLI globally.Configuration
Once the CLI is installed, it needs to be configured with credentials. This command securely stores thegr4vy-id and private key for future use.
- Run the configuration command:
- The CLI requires the following information:
gr4vyId: The instance ID (for example,acme).environment: The environment (for example,sandboxorproduction).privateKey: The path to the private key that was generated and downloaded locally.
~/.gr4vyrc.json.
General usage
Next, a JWT can be created for use in Embed as well as for server-to-server use.--debug flag.
Commands
gr4vy autocomplete
Provides installation instructions to help enable auto-complete for the CLI.
gr4vy checkout-session
Generate a checkout session ID.
gr4vy embed
Generate a token for use with Embed.
gr4vy help
Display help for the gr4vy command.