Skip to content

Commit 398c69d

Browse files
committed
added basic information to bw's doc
1 parent a57175e commit 398c69d

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

crates/bw/README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,50 @@
11
# Bitwarden CLI (testing)
22

33
A testing CLI for the Bitwarden Password Manager SDK.
4+
5+
## Authentication
6+
7+
### Login with API Key
8+
9+
```bash
10+
# With environment variables
11+
export BW_CLIENTID="user.xxx"
12+
export BW_CLIENTSECRET="xxx"
13+
export BW_PASSWORD="xxx"
14+
bw login api-key
15+
16+
# Or with interactive prompts
17+
bw login api-key
18+
```
19+
20+
The login command returns a session key that can be used for subsequent commands.
21+
22+
### Using Sessions
23+
24+
```bash
25+
# Save session to environment variable
26+
export BW_SESSION="<session-key-from-login>"
27+
28+
# Or pass directly to commands
29+
bw list items --session "<session-key>"
30+
```
31+
32+
## Commands
33+
34+
### List Items
35+
36+
```bash
37+
# List all items
38+
bw list items
39+
40+
# Search items
41+
bw list items --search "github"
42+
43+
# Filter by folder, collection, or organization
44+
bw list items --folderid "<folder-id>"
45+
bw list items --collectionid "<collection-id>"
46+
bw list items --organizationid "<org-id>"
47+
48+
# Show deleted items
49+
bw list items --trash
50+
```

0 commit comments

Comments
 (0)