BitwardenCli.Core
0.1.2
dotnet add package BitwardenCli.Core --version 0.1.2
NuGet\Install-Package BitwardenCli.Core -Version 0.1.2
<PackageReference Include="BitwardenCli.Core" Version="0.1.2" />
<PackageVersion Include="BitwardenCli.Core" Version="0.1.2" />
<PackageReference Include="BitwardenCli.Core" />
paket add BitwardenCli.Core --version 0.1.2
#r "nuget: BitwardenCli.Core, 0.1.2"
#:package BitwardenCli.Core@0.1.2
#addin nuget:?package=BitwardenCli.Core&version=0.1.2
#tool nuget:?package=BitwardenCli.Core&version=0.1.2
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
--passwordenvoption 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 | 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
- 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 |