ek) provides commands to authenticate, configure and run your applications with secrets injected as environment variables.
Usage
Global Flags
-h, --help: help forek-v, --version: get the current version of the CLI
Commands
login
login
Authenticate with Enkryptify to access your secrets.This opens a web browser to complete the OAuth flow. After successful authentication, credentials are stored securely in your system keyring.Options:
-f, --force: force re-authentication even if already logged in
logout
logout
Log out of Enkryptify and revoke your CLI token.This revokes the active CLI token on the server and clears local credentials from the system keyring. If the server is unreachable, local credentials are still cleared.
whoami
whoami
Show the currently authenticated user.Displays the name and email of the user associated with the current session. If not logged in or the session has expired, you will be prompted to run
ek login.configure
configure
Link the current git repository to an Enkryptify workspace, project and environment.The configuration is saved to
~/.enkryptify/config.json and associated with the current directory path.run
run
Run a command with secrets from Enkryptify injected as environment variables.This fetches secrets for your configured workspace, project and environment, then executes the provided command with those secrets available as env vars.Arguments:Note: Use Examples:
cmd: command and arguments to run
-e, --env <environmentName>: environment name to use (overrides default from config)-p, --project <projectName>: project name to use (overrides default from config; requires--env)--skip-cache: skip local cache and always fetch fresh secrets from the API--offline: use cached secrets without making an API call
--skip-cache and --offline are mutually exclusive.-- to separate ek run from the command you want to execute.run-file
run-file
Replace all Options:Usage:Examples of files to replace variables in:
${VARIABLES} in a file with the corresponding secrets from Enkryptify.-f, --file <path>: path to the file to process (required)-e, --env <environmentName>: environment name to use (overrides default from config)--skip-cache: skip local cache and always fetch fresh secrets from the API--offline: use cached secrets without making an API call
--skip-cache and --offline are mutually exclusive.sdk
sdk
Run a command with a read-only Enkryptify SDK token injected as the Examples:
ENKRYPTIFY_TOKEN environment variable.The token is scoped to the configured workspace, project and environment and is valid for 8 hours. This is useful for running applications that use the Enkryptify SDK to fetch secrets at runtime instead of having all secrets injected as environment variables.Note: Use -- to separate ek sdk from the command you want to execute.Secret Management
All secret operations are subcommands ofek secret.
secret create
secret create
Create a new secret in the current environment.Arguments:Expected result: the
name: secret key (A-Z, a-z, 0-9, underscore, hyphen)value: secret value (use quotes for spaces or special characters)
DATABASE_URL secret is created in the current environment.secret update
secret update
Update a secret in the current environment.Arguments:Expected result: the
name: secret key to update
--ispersonal: make the secret personal (Enkryptify provider only)
DATABASE_URL secret is updated in the current environment.secret delete
secret delete
Delete a secret from the current environment.Arguments:Expected result: the
name: secret key to delete
DATABASE_URL secret is removed from the current environment.secret list
secret list
List secrets in the current environment.Options:Expected result: a table of secrets with values visible.
-s, --show: show secret values (defaults to masked)
upgrade
upgrade
Upgrade the Enkryptify CLI to the latest version. The command auto-detects the original install method (Homebrew, Scoop or binary) and upgrades accordingly.Options:
-f, --force: force upgrade even if already on the latest version
Secret Caching
Secrets fetched byek run and ek run-file are cached in the system keyring with a 10-second TTL. This avoids redundant API calls when running commands in quick succession.
Three caching modes are available:
- Normal (default): fetches from cache if valid, otherwise calls the API
- Skip cache (
--skip-cache): always fetches fresh secrets from the API - Offline (
--offline): uses cached secrets without any API call; fails if no cache exists