Guides

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:

VariableDescription
EV_API_KEYA Scoped API Key with the appropriate permissions, created from the Evervault Dashboard.
EV_APP_UUIDYour 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
--json

Format any output from the CLI as JSON.

--no-color

Disable coloured output. Note: the CLI will also respect the NO_COLOR and EV_NO_COLOR environment variables to disable colour.

--help

Print the helper text for any command


Relay

Create and manage Relays.

The Evervault CLI can be used to manage your Relays in a continuous integration environment.

ev relay create

Creates an Evervault Relay and generates its configuration file.

ev relay 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.

Flags
--file

The file containing the Relay config you want to use. Defaults to relay.json.

Functions

Use these commands to manage your Functions.

ev function init

Initialize a sample “hello world” Function either in your current directory, or the directory provided

Flags
--force

Overwrite the existing directory at the location if it exists

Options
--dir

The directory to initialize the function into. If not given, the Function will be created in a subdirectory of the current directory using the name of the Function.

ev function create-toml

Creates a starter function.toml in the current directory.

ev function 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 run ev 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.
Flags
--background

Don’t wait for the Function to complete its deployment.

--quiet

Only print essential logs.

ev function env

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
--secret

Mark the environment variable as a secret. This encrypts it and makes it irretrievable. All secrets are decrypted when your function is run.

Options
--name

The name of the Function to interact with. If not given, then the CLI will look for a function.toml in the current directory.

--key

The key of the environment variable you wish to update.

--value

The value of the environment variable you wish to update.

ev function delete

Deletes a Function.

Flags
--force

Force the deletion of the Function. This will prevent any confirmation dialogues.

--use-current-directory

Use the function.toml in the current directory to determine which Function to delete.

Options
--name

The name of the Function you wish to delete.

ev function 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
--name

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.

--data

The JSON Payload to send to the Function.

--in

Path to a file containing the JSON payload to send to the Function, can't be used at the same time as --data.