SDKs
Evervault CLI
This reference documents every command and flag available in the Evervault CLI.
The Evervault CLI allows you to configure your Evervault integration from the terminal.
Installation
Install the Evervault CLI.
This command can also be used to upgrade from a previous major version of the Evervault CLI.
Updating
To update the Evervault CLI to the latest version, run:
The update command will not update between major versions of the Evervault CLI. To update to a new major version, you will need to run the installation command again.
Authentication Environment Variables
To authenticate the Evervault CLI configure the following environment variables:
Variable | Description |
---|---|
EV_API_KEY | A Scoped API Key with the appropriate permissions, created from the Evervault Dashboard. |
EV_APP_UUID | Your App ID, which can be found in the Evervault Dashboard on the app Settings page. |
Example
Global Flags
Globally available flags which can be used with all Evervault CLI commands.
Flags
Encrypt & Decrypt
The Encrypt & Decrypt commands allow you to encrypt data using the Evervault API. For details on the API Endpoints see the Evervault API Reference.
Encrypt
Encrypt data using the Evervault API. Note, while Strings are valid JSON values they must be enclosed in double quotes. For example ev encrypt -d "\"encrypt me!\""
.
Options
Decrypt
Decrypt data using the Evervault API.
Options
Relay
Create and manage Relays.
The Evervault CLI can be used to manage your Relays in a continuous integration environment.
Create a Relay
Creates an Evervault Relay and generates its configuration file.
Deploy
Deploy changes to your Evervault Relay. ev relay deploy
will deploy any changes made to the Relay configuration file.
This is useful for versioning your Relay configuration by checking your relay.json
file into version control.
Functions
Use these commands to manage your Functions.
Initialize a new Function
Initialize a sample “hello world” Function either in your current directory, or the directory provided
Options
Create a new function.toml
Creates a starter function.toml
in the current directory.
Deploy
Deploy a Function using the source code of your current working directory.
- Your current directory needs to contain a valid
function.toml
, created when you runev function init
. - Your Function will use the name set in the
function.toml
- By default, the CLI will wait for the Function deployment to complete. If you only want to begin the deployment and then exit, you can pass in the
--background
flag. This is recommended in a CI/CD environment.
Options
Manage Environment Variables
Manage the environment variables of the Function in your current directory.
Note: Some environment variables are reserved for our use and therefore are immutable.
Flags
Options
The name of the Function to interact with. If not given, then the CLI will look for a function.toml
in the current directory.
Delete
Deletes a Function.
Options
Run
Run a named Function from the command line using a JSON Payload.
Note: This command does not encrypt your data before sending it to the Function.
Options
The name of the Function you wish to invoke. If not provided the CLI will attempt to run the Function defined in a function.toml
in the current working directory.
Whether to run the Function asynchronously. See the Function Execution Time documentation for more information.
Enclaves
The Evervault CLI is the primary interface for building and deploying Enclaves.
Init
Create an Enclave and initialize an enclave.toml
in the current directory.
Options
The port that the in-Enclave service listens on. All incoming requests will be forwarded to this port. If unset, it will be taken as last exposed port in the Dockerfile.
The path that should be used for in-Enclave healthchecks. These healthchecks are performed every second and can be used to probe the running process.
The port to perform healthchecks against. If this is unset, then the healthchecks are assumed to be served over the same port as the incoming requests.
Debug setting for the Enclave. When debug is enabled, you can access logs from within the Enclave.
Flag to enable cert generation during initialization. This will use the default certificate.
Build
The build command mirrors the docker build
command but produces an Enclave Image File (EIF) as output instead of a Docker image. The build command requires a enclave.toml
to be available when creating an Enclave Image File. This can be generated using the ev enclav[FLAGS] init
command.
Options
Build time secrets to provide to Docker. These secrets are used during the Docker build process, similar to the Docker --secret
flag.
New Certificate
Create a new Enclave signing certificate and private key.
Options
Path to the directory where the credentials will be saved. Defaults to the current directory.
Upload Certificate Metadata
Upload a signing certificate's metadata to the Evervault API. This cert can then be used in the cert lock
command.
Note: Certificate metadata is automatically uploaded to the Evervault API when you deploy an Enclave. This command is only necessary if you want to lock deployments to a certificate before the certificate has been used for a deployment. If you have already deployed with the certifcate, the metadata will be available in the cert lock prompt.
Options
Path to directory where the signing cert is. Defaults to the path specified in ./enclave.toml
Lock Certificates
Interactive prompt to lock Enclave deployments to specific signing certificates. An Enclave deployment will fail if the signing certificate used is not in specified locked certs. If no certificates are locked to an Enclave, it can be deployed with any certificate. If you want to lock a newly created certifcate, you must first upload it's metadata using the cert upload
command. This certificate will then be available in the cert lock prompt.
Delete
Delete the Enclave defined in a given enclave.toml
.
Options
Deploy
Deploy the Enclave defined in your enclave.toml
file. By default, the deploy command will ignore any prebuilt EIFs and begin a fresh Enclave build. You can prevent this by providing a path to an existing EIF using the --eif-path
option.
Options
Path to Dockerfile
for Enclave. Will override any Dockerfile
specified in the enclave.toml
file
Build time secrets to provide to Docker. These secrets are used during the Docker build process, similar to the Docker --secret
flag.
The endpoint to use for healthchecks. See healthchecks for more information.
Restart
Restart the Enclave defined in your enclave.toml
file. This will redeploy the Enclave with the same image as your current Deployment, but with the latest environment variables and secrets. This won't affect your Enclave's PCRs
Options
Describe
Get the PCRs of an existing EIF.
List Enclaves
List your Enclaves
List Deployments
List the deployments for your Enclave.
Options
Logs
View the logs for your Enclave. Only available for Enclaves in debug mode.
Options
Add Environment Variable
Add environment variable to be used in a Enclave.
Flags
Delete Environment Variable
Permanently delete a environment variable from the Enclave environment.
Get Environment Variables
Get the environment variables in json format.