Commands
relic
Opens the TUI. This is the default command when no arguments are provided.
relic login
Authenticate via device authorization. A browser window opens for you to sign in with Google or GitHub.
relic logout
Clear your session, cached encryption keys, and stored password.
relic whoami
Show the currently authenticated user.
relic projects
List all projects you own or have been shared with, including their environments and folders.
With
--json, errors are printed as {"error": {"code": "...", "message": "..."}} and the command exits with code 1. Codes include not_logged_in and project_not_found.
relic init
Initialize Relic in the current project. Creates relic.toml and a .relic/ cache directory.
relic.toml; the .relic/ directory contains its own .gitignore (*), so the cache stays out of version control automatically.
relic run
Run a command with secrets injected as environment variables.
Examples:
relic run -e prod node -e "..." runs node -e "...". Relic’s own options must come before the command; use -- to make the boundary explicit.
You don’t need relic.toml when you pass -p, --project or set RELIC_PROJECT_ID. Without a relic.toml, the cache is stored in ~/.config/relic/cache/<project-id>.db.
Environment of the command
By default the command starts with a clean environment: only the decrypted secrets plusPATH, HOME, USER, SHELL, TERM, LANG, LC_ALL, LC_CTYPE, TMPDIR, and TZ from your shell. Anything else (for example NODE_ENV, CI, or GITHUB_*) is not passed through. This keeps unrelated credentials in your shell away from the command.
Use --inherit-env when the command needs your shell or CI environment. The full environment is passed through, minus Relic’s own variables (RELIC_PASSWORD, RELIC_API_KEY, RELIC_SERVICE_TOKEN, …). If a secret has the same name as an existing variable, the secret wins.
On Windows the clean environment keeps the system variables programs need (
PATH, PATHEXT,
SYSTEMROOT, TEMP, USERPROFILE, APPDATA, …); see the full
list. Commands are resolved through PATHEXT, so
npm finds npm.cmd. Shell built-ins like echo need cmd /c, and PowerShell scripts need
pwsh -File. See Windows behavior.Exit codes
relic run exits with the command’s exit code, or 128 + N when the command is killed by signal N. If the command can’t be found, it exits with 127. Errors before the command starts (not logged in, unknown environment, network failures) exit with 1.
relic service-account
Create, list, and revoke service accounts for CI/CD.
relic mcp
Start the MCP server over stdio for AI assistants.
relic upgrade
Upgrade Relic using the method it was installed with (Homebrew, npm, Bun, Scoop, or the install script). On Windows, npm, Bun, and Scoop can’t replace relic.exe while it runs, so relic upgrade prints the command to run instead; installs from the PowerShell installer upgrade in place. If the method can’t be detected, the manual commands are printed.
relic version
Print the installed version.
relic shell
Open an interactive subshell with secrets loaded as environment variables. Commands you run inside it can read the secrets without a relic run prefix or a .env file. Type exit to return to your original shell.
Examples:
RELIC_SHELL=1 and RELIC_ENVIRONMENT so you can show the active environment in your prompt. See Local Development for prompt snippets and details.
relic import
Import secrets into an environment from a dotenv file, JSON, stdin, Doppler, Infisical, Vercel, or 1Password. Values are encrypted on your device before upload. Relic prints a plan with secret names only and asks before changing existing secrets.
source defaults to .env. Use a file path, - for stdin, or doppler, infisical, vercel, 1password.
Examples:
relic push
Sync an environment’s secrets into a deploy platform’s secret store. Supported targets are Vercel, Cloudflare Workers, GitHub Actions, and Fly.io. See Platform Sync for authentication and platform options.
Examples:
relic check
Check that every key your app needs exists in an environment before you deploy. Relic compares secret names only; it never fetches or decrypts values, so it doesn’t need your password.
.env.example, .env.sample, and .env.template next to relic.toml, plus any env reads found by --scan. The command exits with code 1 when a required key is missing.
Examples:
relic guard
Block commits that contain dotenv files or the values of your Relic secrets. Matching happens on your device. See Leak Guard for details.
The command exits with
1 when it finds a leak and 2 on errors.
Examples:
relic secrets
List the secret names in an environment. Values are never fetched or printed.
--json, errors are printed as {"error": {"code": "...", "message": "..."}} and the command exits with code 1. Codes include not_logged_in, no_config, environment_not_found, folder_not_found, and invalid_option.
relic secrets uses your relic login session. It does not support RELIC_API_KEY or
RELIC_SERVICE_TOKEN.relic history
List previous versions of a secret. Values are masked unless you pass --reveal, which decrypts them locally after a confirmation.
Examples:
relic rollback
Restore a previous version of a secret as its current value. Also restores deleted secrets.
Examples:
relic rotation
Check how old secret values are and manage rotation policies. Only names, timestamps, and policies are read; values are never decrypted. See Secret Rotation for how ages and statuses are calculated.
KEY to set or clear the environment policy. A secret policy overrides the environment policy.
Examples:
RELIC_SERVICE_TOKEN set, relic rotation status authenticates with the service account and checks the project it belongs to.
relic telemetry
Manage anonymous usage telemetry.
Configuration File
relic.toml is created by relic init at your project root:
relic.toml. You can override the project ID with --project (highest precedence) or RELIC_PROJECT_ID.
An optional [check] table configures relic check:
[guard] table configures relic guard:
Caching
The CLI caches encrypted data locally at.relic/cache.db (relative to relic.toml) to reduce API calls. Without a relic.toml, it uses ~/.config/relic/cache/<project-id>.db.
- Session mode: Cache is used. Validated against the server’s
updatedAttimestamp on each run. - Service token and API key mode: Cache is not used. Secrets are always fetched fresh.
- Scope filtering (
--scope): Applied locally against cached data. No extra API call needed.
.relic/cache.db. The next run will fetch fresh data.
CI/CD
For non-interactive environments, use a service account instead ofrelic login: