Envbee.SDK
1.8.2
dotnet add package Envbee.SDK --version 1.8.2
NuGet\Install-Package Envbee.SDK -Version 1.8.2
<PackageReference Include="Envbee.SDK" Version="1.8.2" />
<PackageVersion Include="Envbee.SDK" Version="1.8.2" />
<PackageReference Include="Envbee.SDK" />
paket add Envbee.SDK --version 1.8.2
#r "nuget: Envbee.SDK, 1.8.2"
#:package Envbee.SDK@1.8.2
#addin nuget:?package=Envbee.SDK&version=1.8.2
#tool nuget:?package=Envbee.SDK&version=1.8.2
Envbee .NET SDK
Envbee SDK is a .NET client for interacting with the Envbee API (https://envbee.dev). This SDK allows you to securely fetch variables, handle local caching, and optionally decrypt encrypted values using AES-GCM.
Table of Contents
- Installation
- Usage
- Environment Variables
- Methods
- Encryption
- Logging
- Caching
- Dependency Injection
- API Documentation
- License
Installation
You can install the Envbee SDK from NuGet using the .NET CLI:
dotnet add package Envbee.SDK
Or using the NuGet Package Manager in Visual Studio:
Install-Package Envbee.SDK
Usage
You can instantiate the EnvbeeClient class directly with parameters, or configure it using the fluent builder pattern.
using Envbee.SDK;
var client = new EnvbeeClient(
apiKey: "your_api_key",
apiSecret: "your_api_secret",
encKey: "encryption-key-goes-here" // optional
);
string? value = await client.GetAsync("VariableName");
Or using the builder:
var client = EnvbeeClientBuilder.Create()
.WithCredentials("your_api_key", "your_api_secret")
.WithEncryptionKey("32-byte-encryption-key-goes-here")
.Build();
Environment Variables
The SDK supports loading credentials and configuration from environment variables:
ENVBEE_API_KEYENVBEE_API_SECRETENVBEE_ENC_KEY
export ENVBEE_API_KEY="your_api_key"
export ENVBEE_API_SECRET="your_api_secret"
export ENVBEE_ENC_KEY="encryption-key"
Then initialize with:
var client = new EnvbeeClient();
Explicit parameters take precedence over environment variables.
Methods
Task<object?> GetAsync(string variableName)— fetches a variable and returns its value asstring,decimal,int,doubleorboolTask<(IReadOnlyList<JsonElement> Data, Metadata Meta)> GetVariablesAsync(int? offset = null, int? limit = null)— fetches variable metadata with pagination
Encryption
Variables may be encrypted using AES-256-GCM. Encrypted values start with prefix envbee:enc:v1:.
- If an encrypted variable is fetched and a valid
encKeyis provided, the SDK will decrypt it automatically. - If decryption fails due to missing or incorrect key, a
DecryptionExceptionis thrown. - The key is never sent to the server; all cryptographic operations happen locally.
var client = new EnvbeeClient(
apiKey: "your_api_key",
apiSecret: "your_api_secret",
encKey: "encryption-key-goes-here"
);
Logging
The SDK uses Microsoft.Extensions.Logging.
Caching
The SDK caches variables locally to provide fallback data when offline or the API is unreachable. The cache is updated after each successful API call. Local cache stores variables as received from the API, encrypted or plain.
- Encryption key is never stored in cache or sent to API.
- All encryption/decryption happens locally with AES-256-GCM.
Dependency Injection
In ASP.NET Core or generic host apps, you can register the client via extension:
builder.Services.AddEnvbee(cfg => cfg
.WithCredentials(apiKey, apiSecret)
.WithEncryptionKey(encKey));
This registers the client as a singleton. Internally it shares the default HttpClient handler stack.
API Documentation
For more information on envbee API endpoints and usage, visit the official API documentation.
License
This project is licensed under the MIT License. See the LICENSE file for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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. |
-
net8.0
- Microsoft.Extensions.Http (>= 9.0.6)
- Microsoft.Extensions.Logging.Console (>= 9.0.6)
- Microsoft.Extensions.Logging.Debug (>= 9.0.6)
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 |
|---|---|---|
| 1.8.2 | 340 | 11/30/2025 |
| 0.1.0-beta.0 | 148 | 7/6/2025 |