1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
//! A password manager, as of right now it is command line only
//!
//! The interface works by allowing you to encrypt your data with a master password as most
//! password managers do.
//!
//! On the first creatiion of a vault it will prompt you for a master password to use. If there is
//! a need to rotate the master password the `rotate` command is provided, updating the vaults
//! password to the new master password and creating a backup of the old vault if you need to
//! restore the previous password.
//!
//! Whenever pulling a password out of the vault it will copy it to your clipboard for a few
//! seconds and then attempt to restore the previous contents of your clipboard to prevent
//! unintentional pastes of the password.
//!
//!
//! # Examples
//!
//! The basic interface operates around `new`, `get`, `update`, and `delete`.
//!
//! ## New
//!
//! Creating a new `password` or `username-password` combo.
//! ```bash
//! $ pants new password test
//! > Generate password? Yes
//! > Length of password? 32
//! > Use uppercase letters? Yes
//! > Use lowercase letters? Yes
//! > Use numbers? Yes
//! > Use symbols? Yes
//! > Vault password: ********
//! test
//! password: <Copied to clipboard>
//! Resetting clipboard
//! ```
//!
//! ```bash
//! $ pants new username-password check
//! > Username: me
//! > Generate password? No
//! > Password: ********
//! > Vault password: ********
//! check
//! username: me
//! password: <Copied to clipboard>
//! Resetting clipboard
//! ```
//!
//! ```bash
//! $ pants new password removing
//! > Generate password? Yes
//! > Length of password? 32
//! > Use uppercase letters? Yes
//! > Use lowercase letters? Yes
//! > Use numbers? Yes
//! > Use symbols? Yes
//! > Vault password: ********
//! removing
//! password: <Copied to clipboard>
//! Resetting clipboard
//! ```
//!
//! ## Get
//!
//! Retrieve an existing entry
//! ```bash
//! $ pants get test
//! > Vault password: ********
//! test
//! password: <Copied to clipboard>
//! Resetting clipboard
//! ```
//!
//! ## Update
//!
//! Update an existing entry.
//! ```bash
//! $ pants update check
//! > Username: mine
//! > Generate password? Yes
//! > Length of password? 32
//! > Use uppercase letters? Yes
//! > Use lowercase letters? Yes
//! > Use numbers? Yes
//! > Use symbols? Yes
//! > Vault password: ********
//! check
//! username: mine
//! password: <Copied to clipboard>
//! Resetting clipboard
//! ```
//!
//! ## Delete
//!
//! Remove an entry
//! ```bash
//! $ pants delete removing
//! > Vault password: ********
//! Nothing read from vault
//! ```
//!
//! ## List
//!
//! For convenience you can list the existing entries and their type with `list`.
//! ```bash
//! $ pants list
//! Available entries:
//! - check: username-password
//! - test: password//! $ pants list
//! ```
//!
//! # Other commands
//!
//! Other commands include:
//! - backup: creates a backup of the current vault
//! - gen: exposes the password generator in [pants-gen](https://docs.rs/pants-gen/)