OnePassword.NET 2.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package OnePassword.NET --version 2.1.0
                    
NuGet\Install-Package OnePassword.NET -Version 2.1.0
                    
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="OnePassword.NET" Version="2.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OnePassword.NET" Version="2.1.0" />
                    
Directory.Packages.props
<PackageReference Include="OnePassword.NET" />
                    
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 OnePassword.NET --version 2.1.0
                    
#r "nuget: OnePassword.NET, 2.1.0"
                    
#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 OnePassword.NET@2.1.0
                    
#: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=OnePassword.NET&version=2.1.0
                    
Install as a Cake Addin
#tool nuget:?package=OnePassword.NET&version=2.1.0
                    
Install as a Cake Tool

OnePassword.NET - 1Password CLI Wrapper

This library serves as a .NET wrapper for the 1Password command-line tool op.exe ( Download | Documentation ).

nuget master develop

References

This library targets .NET 6.0 and .NET 7.0.

Dependencies

This library has no dependencies.

Quick Start

Creating an instance of the manager

var onePassword = new OnePasswordManager();

Adding your account and signing in for the first time

var domain = "my.1password.com";
var email = "your@email.com";
var secretKey = "A3-YOUR-SECRET-KEY";
var password = "yourpassword";

onePassword.AddAccount(domain, email, secretKey, password);
onePassword.SignIn(password);

Signing in for subsequent connections

onePassword.UseAccount(domain);
onePassword.SignIn(password);

Getting all vaults

var vaults = onePassword.GetVaults();

Selecting a specific vault

var vault = vaults.First(x => x.Name == "Private");

Creating an item using a template

var serverTemplate = onePassword.GetTemplate(Category.Server);

serverTemplate.Title = "Your Item's Title";
serverTemplate.Fields.First(x => x.Label == "username").Value = "secretuser";
serverTemplate.Fields.First(x => x.Label == "password").Value = "secretpass";

var serverItem = onePassword.CreateItem(serverTemplate, vault);

Getting all items in a vault

var items = onePassword.GetItems(vault);

Selecting a specific item

var item = items.First(x => x.Title == "Your Item's Title");

Editing a specific item

item.Fields.First(x => x.Label == "password").Value = "newpass";
onePassword.EditItem(item, vault);

Archiving an item

onePassword.ArchiveItem(item, vault);

Deleting an item

onePassword.DeleteItem(item, vault);

Signing out

onePassword.SignOut();
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net6.0

    • No dependencies.
  • net7.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
2.4.3 515 5/6/2025
2.4.2 2,493 6/18/2024
2.4.1 717 3/19/2024
2.4.0 153 3/14/2024
2.3.4 160 2/28/2024
2.3.3 437 1/19/2024
2.3.2 244 11/11/2023
2.3.1 131 11/8/2023
2.3.0 1,420 9/2/2023
2.2.1 278 7/2/2023
2.2.0 207 6/30/2023
2.1.3 237 5/27/2023
2.1.2 530 1/14/2023
2.1.1 381 1/13/2023
2.1.0 368 12/17/2022