Welcome to the Infisical Env Loader VSCode Extension! This extension simplifies the management of environment variables within Visual Studio Code, making it easier to work with your Infisical-powered projects.
-
Load Environment Variables via Infisical Service Token: Load environment variables securely using your Infisical service token.
-
Convenient User Preference Storage: Save time and effort by remembering your last selected token and environment file.
-
Flexible Configuration with "Reconfigure Infisical": Start fresh by removing previously loaded tokens and environment files from the extension storage.
Clone the project
git clone https://github.com/Vikas208/infisical-env-loader
Go to the project directory
cd infisical-env-loader
Install dependencies
pnpm install
or
yarn install
or
npm install
vsce package --no-dependencies
Manual Installation of Infisical Env Loader VSCode Extension
Follow these steps to manually install the Infisical Env Loader VSCode Extension using the .vsix file:
-
Download the .vsix Extension File:
- Locate the latest release and find the
.vsix
file associated with it. It will typically be named something likeinfisical-env-loader-1.0.0.vsix
,
- Locate the latest release and find the
-
Install the Extension in Visual Studio Code:
- Open Visual Studio Code.
- Go to the Extensions view by clicking on the Extensions icon in the Activity Bar on the side of the window or by using the shortcut
Ctrl+Shift+X
(orCmd+Shift+X
on Mac). - Click the three dots (ellipsis) at the top-right corner of the Extensions view to open the context menu.
- Select "Install from VSIX..." from the context menu.
-
Select the Downloaded .vsix File:
- Navigate to the location where you downloaded the
.vsix
file in Step 1. - Select the downloaded
.vsix
file.
- Navigate to the location where you downloaded the
-
Confirm Installation:
- Visual Studio Code will prompt you to confirm the installation of the extension.
- Click "Install" to proceed.
-
Extension Installation Complete:
- Once the installation is complete, you will see a notification confirming the successful installation of the Infisical Env Loader VSCode Extension.
-
Activate the Extension:
- You may need to restart Visual Studio Code to activate the extension fully.
- After restarting, you should be able to use the extension's features as described in the extension's documentation.
-
Loading Environment Variables via Infisical Service Token:
- Open Visual Studio Code.
- Access the command palette (usually
Ctrl+Shift+P
orCmd+Shift+P
on Mac). - Type and select "ENV MANAGER: Load Environment Variables via Service Token."
- Enter your Infisical service token when prompted.
- A user-friendly environment file selection interface will appear, simplifying the selection of your desired environment configuration.
-
Loading Environment Variables from
launch.json
:- Ensure you have a
launch.json
file in your project. - Open Visual Studio Code.
- Navigate to the command palette.
- Type and select "ENV MANAGER: Load Environment Variables from
launch.json
." - Choose the launch configuration from which you want to load the environment variables.
- Note: You have to put the following env variables under the env variable in the
launch.json
fileinfisicalWorkspaceToken
: Service tokeninfisicalWorkspaceEnv
: env file name e.g.dev
- Ensure you have a
-
Efficient User Preferences Storage:
-
After successfully loading environment variables, the extension retains your token and environment file preferences.
-
The next time you use the extension, it offers the option to reload your last selected settings, saving you valuable time and effort.
-
Select from Last Token:
- Choose "ENV MANAGER: Load from Last Selected Token" to load environment variables using your previously selected token settings.
- This feature streamlines your workflow by automatically applying your previously chosen token settings.
-
Select from Last Environment File:
- Alternatively, opt for "ENV MANAGER: Load from Last Selected Environment File" to quickly access and apply settings from your preferred environment configuration.
-
-
Flexible Configuration with "Reconfigure Infisical":
- If you wish to start fresh and remove previously loaded tokens and environment files from the extension storage, select the "Reconfigure Infisical" option from the command palette.
If you have any feedback, questions, or encounter any issues with the Infisical Env Loader VSCode Extension, please don't hesitate to reach out to us. Your input is invaluable as we continue to improve this extension to better serve your needs.
Thank you for choosing the Infisical Env Loader VSCode Extension! Happy coding!