Skip to content

CLI Reference

Command Forms

bash
envlock (-p <path> | --use <name>) [--output <shell|json>] [--strict] [-- <cmd...>]
envlock preview --profile <path> [--output <text|json>]
envlock self-update [--check] [--version <x.y.z|vX.Y.Z>] [-y|--yes]

Run Command Options

OptionDescription
-p, --profile <path>Explicit JSON profile path.
--use <name>Named profile under ENVLOCK_PROFILE_HOME/profiles.
`--output <shelljson>`
--strictFail on duplicate keys in final output.
`--log-level <errorwarn
`--log-format <textjson>`
-- <cmd...>Run child command with injected env and return child exit code.

self-update Options

OptionDescription
--checkCheck availability only; no install.
`--version <x.y.zvX.Y.Z>`
-y, --yesSkip confirmation prompt.

preview Options

OptionDescription
-p, --profile <path>Explicit JSON profile path to inspect.
`--output <textjson>`

preview is read-only and does not execute injections. It exposes metadata only:

  • env: key names only.
  • command: program and argument count only.
  • symlink: path metadata only.

Exit Behavior

  • Shell/JSON output mode: exits 0 on success.
  • Command mode: exits with child exit code.
  • Validation/parsing failures: non-zero exit.

Built with VitePress