Karls.BetterSecretsTool 1.2.0

dotnet tool install --global Karls.BetterSecretsTool --version 1.2.0
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local Karls.BetterSecretsTool --version 1.2.0
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=Karls.BetterSecretsTool&version=1.2.0
                    
nuke :add-package Karls.BetterSecretsTool --version 1.2.0
                    

Karls Better Secrets Tool NuGet Version NuGet Downloads codecov

An easier way to manage your .NET User Secrets from the command line.

Better Secrets Tool Screenshot

Installation

As a local tool:

dotnet new tool-manifest # if you don't have a manifest already
dotnet tool install Karls.BetterSecretsTool

As a global tool:

dotnet tool install -g Karls.BetterSecretsTool

While a global tool is convenient since it is always available, a local tool ensures that everyone working on the project uses the same version of the tool and that new versions are picked up automatically by tools such as Dependabot/Renovatebot.

Installing this tool requires the .NET 10 SDK. NativeAOT packages are selected for supported platforms; other platforms use the framework-dependent package and require a compatible .NET runtime.

NativeAOT support

NativeAOT binaries are currently published for:

  • linux-x64
  • win-x64
  • osx-arm64

NativeAOT packages are published for the supported runtime identifiers above. The NuGet tool package also includes a platform-independent, framework-dependent fallback for other platforms.

Usage

Run better-secrets in the directory of your project to manage its user secrets.

As a local tool:

dotnet better-secrets

As a global tool:

dotnet-better-secrets

Using dnx if on .NET 10 SDK:

dnx Karls.BetterSecretsTool

Azure Key Vault Integration

You can download secrets from an Azure Key Vault into your user secrets store. This can be very useful to easily get a bunch of default secrets into your development environment.

To do this you need to add a new property to your .csproj file, <UserSecretsKeyVault>:

  <PropertyGroup>
    <UserSecretsId>b6a435f3-371e-4719-bd15-d257df8962c4</UserSecretsId>
    <UserSecretsKeyVault>local-dev-key-vault</UserSecretsKeyVault>
  </PropertyGroup>

The value of the property is the name of your key vault. The tool will then try to access the key vault using DefaultAzureCredential. This means that if you are logged in with the Azure CLI (az login) and have access to the key vault, it should just work. If not it might prompt you to login in a browser.

You need to have at least the Key Vault Secrets User role assigned in the key vault.

License

The project is released under the MIT license. Parts of the code are derived from the ASP.Net Core repository which is licensed by the .NET Foundation under the MIT license. See individual file headers for details.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
1.2.0 118 11/12/2026
1.1.0 557 3/14/2026
1.0.2 263 2/18/2026
1.0.1 272 12/30/2025
1.0.0 506 11/30/2025
0.0.7 285 11/15/2025
0.0.6 328 11/5/2025
0.0.5 311 10/16/2025
0.0.4 262 10/15/2025
0.0.3 276 10/15/2025
0.0.2 230 10/12/2025