Skip to content

stefan-karlsson/LocalEnvVar

Contributors Forks Stargazers Issues project_license LinkedIn


Logo

LocalEnvVar

Easily map your local environment variables from any source.
Explore the docs »
· Report Bug · Request Feature

Table of Contents
  1. About The Library
  2. Getting Started
  3. Usage
  4. Contributing
  5. License
  6. Contact

About The Library

LocalEnvVar is a lightweight .NET library that simplifies local development by letting you easily map environment variables from any source to your local environment. It’s built with extensibility in mind—while it currently supports a single source, additional sources will be added in future releases.

(back to top)

Built With

Dotnet 9

(back to top)

Getting Started

Prerequisites

  • .NET 9 SDK

Installation

LocalEnvVar is available as NuGet packages. You can install the library using the following methods:

Using .NET CLI

# Install core package for basic environment variable handling
dotnet add package LocalEnvVar.Core

# Install AWS Lambda package that provider environment variables from AWS Lambda.
dotnet add package LocalEnvVar.Aws.Lambda

Using Package Manager Console

# Install core package
Install-Package LocalEnvVar.Core

# Install AWS Lambda package
Install-Package LocalEnvVar.Aws.Lambda

(back to top)

Usage

using LocalEnvVar.Aws.Lambda;
using LocalEnvVar.Core;

await EnvVar.MapToLocal(
    new LambdaEnvProvider("my-fancy-LambdaFunction-TYWXBqyYkkCM")
);

// All environment variables are now available for use in your local environment

(back to top)

Contributing

We appreciate and welcome contributions from the community! Before you get started, please take a moment to review our CONTRIBUTING.md file, which includes:

  • Code of Conduct
  • Development setup guide
  • Workflow for submitting pull requests

For any substantial changes, please open an issue first to discuss what you would like to change. This helps ensure your time is well spent and that your contributions align with the project's direction.

Quick start:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Make sure to:

  • Follow the existing code style
  • Add/update tests as needed
  • Update documentation to reflect your changes
  • Include a clear description of your changes in your PR

Thank you for helping make LocalEnvVar better! 🚀

(back to top)

Top contributors:

contrib.rocks image

License

Distributed under the MIT license. See LICENSE for more information.

(back to top)

Contact

Stefan Karlsson - iam@stefan-karlsson.se

Project Link: https://github.com/stefan-karlsson/LocalEnvVar

(back to top)

About

Load and set local environment variables from remote sources.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages