doc.go

v1.0.0
Doc Versions Source
1
// Package bitwarden provides a comprehensive Go client library for Bitwarden and
2
// Vaultwarden password managers. It supports both CLI-based communication (via bw serve)
3
// and direct server communication with end-to-end encryption.
4
//
5
// The library provides two client modes:
6
//
7
//   - Client: Communicates via Bitwarden CLI's "bw serve" API (requires running CLI)
8
//   - DirectClient: Direct server communication with full encryption support (no CLI needed)
9
//
10
// Both clients implement the VaultClient interface, providing a unified API for vault operations
11
// including items, folders, collections, organizations, Send, and attachments.
12
//
13
// Basic usage with Client:
14
//
15
//	client := bitwarden.NewClient()
16
//	err := client.Unlock(context.Background(), "master-password")
17
//	items, _ := client.Items().List(context.Background(), nil)
18
//
19
// Basic usage with DirectClient:
20
//
21
//	client := bitwarden.NewDirectClient(
22
//	    "https://vault.bitwarden.com",
23
//	    "user@example.com",
24
//	    "master-password",
25
//	)
26
//	err := client.Unlock(context.Background(), "master-password")
27
//	client.Sync(context.Background())
28
//	items, _ := client.Items().List(context.Background(), nil)
29
package bitwarden
30

Source Files