Infisical / Infisical/infisical

[ENG-165] Provide an environment variable to set the `--env` option globally

Open
#1,069 3 comments 3 reactions 1 assignee Claimed by @kiranmurali93 View on GitHub
🚀 feature request 🪓 cli
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.