Environment Management
lazyenv supports multiple environments per project.
Default environments
Section titled “Default environments”- dev: Development environment
- staging: Staging/preview environment
- prod: Production environment
Custom environments
Section titled “Custom environments”Define custom environments during init:
lazyenv init --environments dev,qa,uat,prod --yesSwitching environments
Section titled “Switching environments”Use the --env flag:
lazyenv sync --env staginglazyenv pull --env prodlazyenv run --env dev npm startMulti‑environment operations
Section titled “Multi‑environment operations”Sync to all environments
Section titled “Sync to all environments”lazyenv sync --all-environments --yesAdd to all environments
Section titled “Add to all environments”lazyenv add KEY "value" --all-environments --yesDelete from all environments
Section titled “Delete from all environments”lazyenv delete KEY --all-environments --forceEnvironment‑specific values
Section titled “Environment‑specific values”Set different values per environment interactively:
# Interactive mode prompts for each environmentlazyenv syncOr use separate commands:
lazyenv add API_KEY "dev-key" --env devlazyenv add API_KEY "staging-key" --env staginglazyenv add API_KEY "prod-key" --env prodConfiguration
Section titled “Configuration”Environments are stored in .lazyenv/config.json:
{ "environments": ["dev", "staging", "prod"], "defaultEnvironment": "dev"}