-
Notifications
You must be signed in to change notification settings - Fork 1
I hate key input
The priorities are as follows:
- Environment Variables
TENOR_API_KEY
orGIPHY_API_KEY
- Text Box for entering a key
TENOR : TENOR_API_KEY
GIPHY : GIPHY_API_KEY
To persist environment variables and keep them assigned even after a computer reboot, follow these steps in PowerShell:
- Run PowerShell as an administrator.
- Enter the following command to set the variable as a user environment variable:
[Environment]::SetEnvironmentVariable("TENOR_API_KEY", "Insert your Tenor Key", "User")
Executing the above command will set the TENOR_API_KEY
environment variable as a user environment variable, ensuring its persistence.
Now, even if you reboot the computer, the TENOR_API_KEY
environment variable will remain intact.
macOS to set environment variables and ensure persistence even after reboot is by using the launchctl setenv
command in the Terminal. Here is the command for this approach:
launchctl setenv TENOR_API_KEY "<YOUR_API_KEY>"
Execute the command above, replacing <YOUR_API_KEY>
with your actual API key. Now, the environment variable TENOR_API_KEY
will be set, and it will remain intact even after reboot.
This method offers a quick and straightforward way to set environment variables via the Terminal and ensure their persistence.