dotenv-vault.net 0.0.4

dotnet add package dotenv-vault.net --version 0.0.4
NuGet\Install-Package dotenv-vault.net -Version 0.0.4
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="dotenv-vault.net" Version="0.0.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add dotenv-vault.net --version 0.0.4
#r "nuget: dotenv-vault.net, 0.0.4"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install dotenv-vault.net as a Cake Addin
#addin nuget:?package=dotenv-vault.net&version=0.0.4

// Install dotenv-vault.net as a Cake Tool
#tool nuget:?package=dotenv-vault.net&version=0.0.4

dotenv-vault.net

NuGet version Nuget downloads

Alt Text

Extends the proven & trusted foundation of dotenv, with a .env.vault file.

The extended standard lets you sync your .env files – quickly & securely. Stop sharing them over insecure channels like Slack and email, and never lose an important .env file again.

Installation

Follow these steps to install both of these libraries:

  • dotenv-vault.net
  • dotenv.net (3.1.0 ⇐ version < 3.2.0)

If you want to add library reference manually then add this line to your csproj file:

<PackageReference Include="dotenv-vault.net" Version="0.0.1"/>

If you're using the Visual Studio package manager console, then run the following:

Install-Package dotenv-vault.net

If you are making use of the dotnet CLI, then run the following in your terminal:

dotnet add package dotenv-vault.net

Usage

Ensure you have declared the necessary namespace at the head of your class file:

using dotenv_vault.net;

Load Environment Variables

Calling the Load() method with no parameters would locate and load the .env file in the same directory that the library is if one exists:

DotEnvVault.Load();

If you want to be notified of exceptions that occur in the process of loading env files then you can specify that via the configuration options:

DotEnvVault.Load();

Defaults:

The default is .env

The defaults are true and 4 directories up

The default encoding is UTF-8

The default to trim whitespaces is false

The default to skip overwriteing an environment variable is true

Dotenv.org

You need a Dotenv Account to use Dotenv Vault. It is free to use with premium features.

alternate text is missing from this package README image alternate text is missing from this package README image <br> alternate text is missing from this package README image alternate text is missing from this package README image <br> alternate text is missing from this package README image alternate text is missing from this package README image

Visit health.dotenv.org for more information.

FAQ

What happens if DOTENV_KEY is not set?

Dotenv Vault gracefully falls back to dotenv.net when DOTENV_KEY is not set. This is the default for development so that you can focus on editing your .env file and save the build command until you are ready to deploy those environment variables changes.

Should I commit my .env file?

No. We strongly recommend against committing your .env file to version control. It should only include environment-specific values such as database passwords or API keys. Your production database should have a different password than your development database.

Should I commit my .env.vault file?

Yes. It is safe and recommended to do so. It contains your encrypted envs, and your vault identifier.

Can I share the DOTENV_KEY?

No. It is the key that unlocks your encrypted environment variables. Be very careful who you share this key with. Do not let it leak.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Changelog

See CHANGELOG.md

License

MIT

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.1 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.0.4 938 11/30/2022
0.0.3 675 11/29/2022
0.0.2 692 11/28/2022
0.0.1.2 649 11/28/2022
0.0.1.1 699 11/28/2022
0.0.1 669 11/22/2022

Intial release