CI/CD Integration
In CI, lazyenv should either run without prompts or fail fast if it would prompt.
Non-Interactive Flags
Section titled “Non-Interactive Flags”| Flag | Purpose | Commands |
|---|---|---|
--yes / -y | Skip prompts, use defaults | init, sync, add |
--non-interactive | Fail if a command would prompt/guess | sync, add |
--force | Skip confirmation prompts | delete, migrate |
--all-environments | Apply to all environments | sync, add, delete |
Notes:
--yesis permissive. If lazyenv can’t decide safely, it may skip or prompt depending on the command.--non-interactiveis strict. Combine it with--yesfor deterministic CI.
Recommended pattern
Section titled “Recommended pattern”- Install
lazyenv - Export store auth env vars (see your store page)
- Run
lazyenv sync --yes --non-interactive
GitHub Actions example
Section titled “GitHub Actions example”name: lazyenvon: push: branches: [main]
jobs: sync: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4
- uses: actions/setup-node@v4 with: node-version: 20
- name: Install lazyenv run: | corepack enable pnpm add -g lazyenv
- name: Sync secrets (strict) env: # Store auth env vars: # - Infisical: INFISICAL_API_TOKEN # - Doppler: DOPPLER_TOKEN # - Bitwarden: BITWARDEN_ACCESS_TOKEN + BITWARDEN_ORGANIZATION_ID # - 1Password: OP_SERVICE_ACCOUNT_TOKEN INFISICAL_API_TOKEN: ${{ secrets.INFISICAL_API_TOKEN }} run: lazyenv sync --env prod --all-environments --yes --non-interactiveExamples
Section titled “Examples”lazyenv sync --env prod --all-environments --yes --non-interactiveAdd (non‑interactive)
Section titled “Add (non‑interactive)”lazyenv add API_KEY "$API_VALUE" --all-environments --yesDelete (destructive)
Section titled “Delete (destructive)”lazyenv delete OLD_KEY --forceStore auth env vars
Section titled “Store auth env vars”Set the store auth env vars as CI secrets: