nifectl orgenv Command Reference
Manage organisation env sets.
Overview​
An org env set is a named group of environment variables that belongs to an organisation. The orgenv commands list, show, create, update and delete these sets. They mirror the Global Envs tab in the nife.io dashboard.
Values are encrypted before they are sent and shown as ****** unless you ask for them with --reveal.
Subcommands​
| Subcommand | Description |
|---|---|
orgenv list | List the env sets of an organization |
orgenv show | Show the variables of an env set |
orgenv create | Create an env set |
orgenv update | Add, change or remove variables, or rename an env set |
orgenv delete | Delete an env set |
nifectl orgenv <subcommand> [flags]
Options​
--org string Slug of the organization (asked if you have more than one)
-h, --help Help for orgenv
Global Options​
-t, --access-token string Nife API Access Token
-j, --json JSON output format
-V, --verbose Verbose / debug output
orgenv list​
List the env sets of an organization.
List the env sets of an organization with the number of variables in each.
nifectl orgenv list [flags]
Options:
--org string Slug of the organization (asked if you have more than one)
orgenv show​
Show the variables of an env set.
Values are hidden unless you pass --reveal.
nifectl orgenv show NAME [flags]
Options:
--org string Slug of the organization (asked if you have more than one)
--reveal Show the values, not ******
Examples:
nifectl orgenv show shared-config --org acme --reveal
orgenv create​
Create an env set.
Create an env set from --env NAME=VALUE flags, a .env file, or both. The set name uses lowercase letters, numbers, '-' and '.'.
nifectl orgenv create NAME [flags]
Options:
--org string Slug of the organization (asked if you have more than one)
--env strings Variable in NAME=VALUE format (repeatable)
--from-file string Path to a .env file with NAME=VALUE lines
Examples:
nifectl orgenv create shared-config --org acme --env LOG_LEVEL=info --env REGION=ap-south-1
nifectl orgenv create shared-config --org acme --from-file .env
orgenv update​
Add, change or remove variables, or rename an env set.
Change an env set. Variables you do not mention stay as they are.
nifectl orgenv update NAME [flags]
Options:
--org string Slug of the organization (asked if you have more than one)
--env strings Variable to add or change, in NAME=VALUE format (repeatable)
--unset strings Name of a variable to remove (repeatable)
--from-file string Path to a .env file whose variables are added or changed
--rename string New name for the set
Examples:
nifectl orgenv update shared-config --org acme --env LOG_LEVEL=debug --unset OLD_FLAG
nifectl orgenv update shared-config --org acme --rename shared-config-v2
orgenv delete​
Delete an env set.
nifectl orgenv delete NAME [flags]
Options:
--org string Slug of the organization (asked if you have more than one)
-y, --yes Accept all confirmations
Examples:
nifectl orgenv delete shared-config --org acme
Best Practices​
- Use
--from-file .envso secret values do not end up in your shell history. orgenv updateleaves every variable you do not mention as it is; use--unset NAMEto remove one and--renameto rename the set.- Set names use lowercase letters, numbers,
-and.. - Pass
--yestoorgenv deletein scripts to skip the confirmation.
See Also​
nifectl secrets– App secretsnifectl orgs– Organisation management commandsnifectl– The Nife CLI home command
Summary​
Nifectl Orgenv keeps shared configuration in one place for the whole organisation, encrypted in transit and hidden by default.