Skip to content

CLI Commands

Shared flags and resolution rules live in CLI Options.

Initialize a repo: scan for .env.example files and write .lazyenv/config.json.

Terminal window
lazyenv init --store <infisical|doppler|bitwarden|onepassword>

Command-specific flags:

FlagMeaning
--project <name>Project name/slug
--project-id <id>Use an existing project identifier (store-specific)
--environments <envs>Comma-separated environments (e.g. dev,staging,prod)
--createCreate the project when supported (non-interactive only; requires --project)

Sync keys from .env.example into your store.

Terminal window
lazyenv sync

Command-specific flags:

FlagMeaning
--dry-runPrint planned actions without writing secrets or running provisioners
--skip-unspecifiedSkip keys not present in .env.example
--rotateRotate secrets for rules that opt into rotation (onExists=rotate)
--rotate-match <pattern>Only rotate/provision keys matching a RegExp string
--promote-globalCopy successfully used global provisioners into .lazyenv/config.json (useful for CI)
--targetsRun all configured targets after a successful store sync
--target <name>Run a named target after a successful store sync (repeatable)

Pull secrets from your store and write .env files.

Terminal window
lazyenv pull

Notes:

  • pull also resolves configured imports for each folder (read-through).

Run a command with secrets injected as environment variables.

Terminal window
lazyenv run -- <command...>

Notes:

  • If the store is unavailable, lazyenv run can fall back to local .env files.
  • run also resolves configured imports for the current folder (read-through).

Add a key/value to the store and update .env.example.

Terminal window
lazyenv add <key> [value]

Command-specific flags:

FlagMeaning
--value <value>Alternative to positional value
--all-environmentsAdd to all configured environments

Delete a key from the store and remove it from .env.example.

Terminal window
lazyenv delete <key>

Command-specific flags:

FlagMeaning
--forceSkip confirmation
--all-environmentsDelete from all configured environments

List secrets in the project.

Terminal window
lazyenv list

Command-specific flags:

FlagMeaning
--jsonJSON output
--show-valuesInclude values in output

Get a single secret value.

Terminal window
lazyenv get <key>

Command-specific flags:

FlagMeaning
--jsonJSON output

Migrate secrets between stores.

Terminal window
lazyenv migrate --to <infisical|doppler|bitwarden|onepassword>

Command-specific flags:

FlagMeaning
--from <store>Source store (defaults to .lazyenv/config.json store)
--project-from <id>Source project identifier (defaults to .lazyenv/config.json projectId)
--project-to <id>Target project identifier
--from-envs <envs>Comma-separated source envs/configs
--env-mappings <json>JSON env mapping
--auto-mapAuto-map env aliases (prd/production→prod)
--folders <paths>Comma-separated workspace folder paths
--organization-id <id>Infisical org id (required when updating config to store=infisical)
--no-update-configDo not update .lazyenv/config.json after migration

Dev-only helpers for stable ports and derived URLs.

Terminal window
lazyenv dev ports
lazyenv dev status

Launch the interactive terminal UI.

Terminal window
lazyenv tui

Manage provisioners and provisioner rules.

Terminal window
lazyenv provisioners list
lazyenv provisioners bind <KEY>
lazyenv provisioners test <NAME>

Open the current project in your browser.

Terminal window
lazyenv open

Targets are sinks for fan-out:

  • github: upsert GitHub repo secrets
  • store: mirror selected keys into another store/project/path
Terminal window
lazyenv targets create
lazyenv targets list
lazyenv targets run <NAME>

Command-specific flags:

FlagMeaning
--yesNon-interactive mode; requires needed values in env vars
--env <environment>Source environment used for store targets

Manage cross-project imports (compose/read-through only).

Terminal window
lazyenv imports add --from ../.lazyenv/config.json --source-folder . --target-folder apps/web --keys BETTER_AUTH_SECRET
lazyenv imports list
lazyenv imports validate

Generate shell completion scripts.

Terminal window
lazyenv complete zsh
lazyenv complete bash
lazyenv complete fish
lazyenv complete powershell

See: Shell Completions.