Infisical / Infisical/infisical
[ENG-165] Provide an environment variable to set the `--env` option globally
- Dominant language
- TypeScript
- Stars
- 29.3k
- Forks
- 2.3k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 320
Description
### Feature description
Currently, if we want to set the environment during an `export` other than the default, we need to provide the `--env` option.
I'd like the ability to set this `--env` option globally by using an environment variable, for example, `INFISICAL_ENV=prod`.
This is currently doable in user-land by doing: `infisical export --env ${INFISICAL_ENV:-development}` but that's not cross-platform so it would be better if it was supported natively by infisical.
### Why would it be useful?
It would be useful in monorepos where a lot of packages have the `export` command to produce their `.env` files. With a global environment variable, I'm able to produce all the `.env` files for a specific environment without altering the `export` commands.
From [SyncLinear.com](https://synclinear.com) | [ENG-165](https://linear.app/infisical/issue/ENG-165/provide-an-environment-variable-to-set-the-env-option-globally)
Contributor guide
Assessment
This issue has not been assessed yet.