Prerequisites
Before you use the CLI, you will need:- An account and instance.
- A private key to authenticate with the API. You can generate one in the Integrations section of your dashboard.
Installation
Our CLI required Node JS to be installed. Once you’re ready, run the following command to install the CLI globally.Configuration
Once the CLI is installed, you need to configure it with your credentials. This command will securely store yourgr4vy-id
and private key for future use.
- Run the configuration command:
- The CLI will require you to pass the following information:
gr4vyId
: Your instance ID (e.g.,acme
).environment
: Your environment (e.g.,sandbox
orproduction
).privateKey
: The path to the private key that you generated and downloaded locally.
~/.gr4vyrc.json
.
General usage
Next, you can create a JWT for use in Embed as well as for server-to-server use.--debug
flag.
Commands
gr4vy autocomplete
Provides installation instructions to help you 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.