Hyprx.DotEnv
0.0.0-alpha.0
See the version list below for details.
dotnet add package Hyprx.DotEnv --version 0.0.0-alpha.0
NuGet\Install-Package Hyprx.DotEnv -Version 0.0.0-alpha.0
<PackageReference Include="Hyprx.DotEnv" Version="0.0.0-alpha.0" />
<PackageVersion Include="Hyprx.DotEnv" Version="0.0.0-alpha.0" />
<PackageReference Include="Hyprx.DotEnv" />
paket add Hyprx.DotEnv --version 0.0.0-alpha.0
#r "nuget: Hyprx.DotEnv, 0.0.0-alpha.0"
#:package Hyprx.DotEnv@0.0.0-alpha.0
#addin nuget:?package=Hyprx.DotEnv&version=0.0.0-alpha.0&prerelease
#tool nuget:?package=Hyprx.DotEnv&version=0.0.0-alpha.0&prerelease
Hyprx.DotEnv
Overview
An implementation of dotenv for parsing and writing .env files.
This library can:
- expand environment variables such as
MYVAR=${HOME}/.config
- perserves the order of the environment variables defined in the file.
- can parse and write comments.
- can load multiple files and expand the environment variables.
- can handle extra parsing features such as json, yaml, and bacticks.
- avoids reflection to help with AOT scenarios.
Usage
using Hyprx.DotEnv;
var doc = DotEnvSerializer.DeserializeDocument(
"""
# COMMENT
KEY=VALUE
MULTILINE=" my
value
spans
multiple
lines"
single='single value'
PF="${USERPROFILE:-notfound}"
""");
foreach(var node in doc)
{
if (node is DotEnvEmptyLine)
Console.WriteLine("");
if (node is DotEnvComment comment)
Console.WriteLine($"#{comment.Value}");
if (node is DotEnvEntry entry)
Console.WriteLine($"{entry.Key}=\"{entry.Value}\"");
}
var content = DotEnvSerializer.DeserializeDocument(doc);
Console.WriteLine(content);
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Hyprx.Core (>= 0.0.0-alpha.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Hyprx.DotEnv:
Package | Downloads |
---|---|
Hyprx.Rex.Console
The Hyprx.Rex.Console package enables you to create a cli task runner or a make-like experience in .NET within console projects or using `dotnet run app.cs` (single files). |
|
Hyprx.DotEnv.Expansion
Expand variables and perform command substitution in dotenv (.env) files. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
0.0.0-alpha.3 | 120 | 7/10/2025 |
0.0.0-alpha.2 | 114 | 7/10/2025 |
0.0.0-alpha.1 | 122 | 6/25/2025 |
0.0.0-alpha.0 | 131 | 6/17/2025 |
# Hyprx.DotEnv Changelog
## 0.0.0-alpha.0
An implementation of dotenv for parsing and writing .env files.
This library can:
- expand environment variables such as `MYVAR=${HOME}/.config`
- perserves the order of the environment variables defined in the file.
- can parse and write comments.
- can load multiple files and expand the environment variables.
- can handle extra parsing features such as json, yaml, and bacticks.
- avoids reflection to help with AOT scenarios.