BitwardenCli.Core 0.1.2

dotnet add package BitwardenCli.Core --version 0.1.2
                    
NuGet\Install-Package BitwardenCli.Core -Version 0.1.2
                    
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="BitwardenCli.Core" Version="0.1.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BitwardenCli.Core" Version="0.1.2" />
                    
Directory.Packages.props
<PackageReference Include="BitwardenCli.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add BitwardenCli.Core --version 0.1.2
                    
#r "nuget: BitwardenCli.Core, 0.1.2"
                    
#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.
#:package BitwardenCli.Core@0.1.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=BitwardenCli.Core&version=0.1.2
                    
Install as a Cake Addin
#tool nuget:?package=BitwardenCli.Core&version=0.1.2
                    
Install as a Cake Tool

BitwardenCli.Core

BitwardenCli.Core is a UI-independent .NET client for the official Bitwarden CLI (bw). It provides structured command results, secure secret transport, cancellation and isolated multi-account profiles through BITWARDENCLI_APPDATA_DIR.

The package targets .NET 10 and does not depend on WinUI, Reactor, WPF or any other UI framework.

Status

This package is under active development. The 0.1.x line is the first integration target for BitwardenForReactor and other desktop clients.

Build

dotnet restore
dotnet build --no-restore
dotnet test --no-build
dotnet pack src/BitwardenCli.Core/BitwardenCli.Core.csproj -c Release -o artifacts

Release

GitHub Actions publishes tagged releases to NuGet.org through OIDC trusted publishing after building, testing, and validating the package. Policy configuration, dry runs, and Tag conventions are documented in docs/nuget-release.md.

Quick start

using BitwardenCli.Core;
using BitwardenCli.Core.Accounts;
using BitwardenCli.Core.Authentication;

var profile = new BitwardenAccountProfile
{
    Id = Guid.NewGuid(),
    DisplayName = "Personal",
    CliDataDirectory = Path.Combine(
        Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
        "MyApp", "accounts", "personal", "cli")
};

var client = new BitwardenCliClientFactory(new BitwardenCliOptions
{
    ExecutablePath = "bw"
}).Create(profile);

var status = await client.GetStatusAsync();
var secrets = DelegateSecretProvider.FromMasterPassword("prompted by the host UI");
var unlocked = await client.UnlockAsync(secrets);
if (unlocked.IsSuccess)
{
    var items = await client.Vault.ListItemsAsync();
}

Create one stable profile per account and give every profile a different absolute CliDataDirectory. The library injects BITWARDENCLI_APPDATA_DIR into every process. Sessions remain in memory and are scoped to the resulting client instance.

Command groups are available through Authentication, Synchronization, Vault, Folders, Attachments, Organizations, Generator, ImportExport, Sends, and Administration. Every operation accepts a CancellationToken and returns a CliResult with a stable error category.

See the 0.1.0 migration guide when replacing a copied application service.

Security model

  • Account CLI data is isolated by profile directory.
  • Session keys and login secrets are memory-only.
  • Secrets and vault JSON are not placed in process arguments.
  • The library does not persist credentials.
  • Password-protected export is intentionally unavailable because the current CLI has no --passwordenv option for export. Account-key encrypted JSON remains available.

Bitwarden is a trademark of Bitwarden Inc. This project is an independent client library and is not affiliated with Bitwarden Inc.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.

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.1.2 109 8/12/2026