Skip to content

CLI Overview

The lazyenv CLI manages secrets using a pluggable store (Infisical, Doppler, Bitwarden, 1Password).

Start here:

See CLI Options for how lazyenv resolves store/project/env and the shared flags.

Commands prompt for input when needed:

Terminal window
lazyenv init
# Prompts for store + project
lazyenv sync
# Prompts for each secret value

Use flags to skip prompts (ideal for CI/CD):

Terminal window
lazyenv init --store <store> --project my-app --create --yes
lazyenv sync --env prod --yes
lazyenv add API_KEY "value" --yes

Target specific environments:

Terminal window
lazyenv sync --env staging
lazyenv pull --env prod
lazyenv run --env dev npm start

Work with specific workspace folders:

Terminal window
lazyenv sync --folder apps/web
lazyenv pull --folder apps/api
lazyenv list --folder packages/shared

lazyenv automatically detects:

  • Current workspace folder from your working directory
  • Project ID from .lazyenv/config.json
  • Available environments from config

Many commands support JSON for scripting.

Combine commands in CI/CD workflows:

Terminal window
lazyenv init --yes && lazyenv sync --yes && lazyenv pull

View help for any command:

Terminal window
lazyenv --help # List all commands
lazyenv init --help # Help for init command
lazyenv sync --help # Help for sync command