A pass extension that lets you copy metadata associated with passwords.
pass>= 1.7.0: extension supportPython>= 3.8:@cached_propertyfeature- pyperclip: copying to clipboard
- Everything in
Requirementssection - just: to run recipes (similar to
make) - pytest >= 8.0.0: for unit testing
export PASSWORD_STORE_ENABLE_EXTENSIONS=truejust installpass yank --show? <name> <pattern>*| Variable Name | Alt | Description | Default | Example |
|---|---|---|---|---|
show |
-s |
Show value rather than copying to clipboard | False |
-s |
name |
Positional | Password file to fetch metadata from | None | amazon |
pattern |
Positional | Regex patterns to fetch from metadata, first match is used | "^user.*$" "^email.*$" |
username |
The term metadata means all the lines in a pass file that are not the
password itself.
Each line is a potential metadata entry, in order to be picked up by the
extension it must nhave a : separator.
Keys are normalized before checking if the regex matches, normalization involves stripping
any spaces around the key, converting to lowercase, and replacing spaces with _.
Lets say we had the following file for amazon:
super-secret-password
Username: user@example.com
User Id: my-user-id
URL: *.amazon.com/*
url: https://amazon.com/some-url
If we provided no custom patterns and simply ran: pass yank amazon
The Username field would be matched and the extension would copy user@example.com into
the clipboard. The UserId field also matches but since it occurs later in the file it
ends up being ignored.
If we provided url as the pattern: pass yank amazon url
The URL field would be matched and the extension would copy *.amazon.com/* into the
clipboard. This is a consequence of the implementation, since we process the file top to
bottom only the normalized keys that occur earlier are kept.
In its current state there is no way to get the second url field.
- pass-extension-meta: Basically exactly the same thing with some implementation detail differences
- pass-cl: Similar but focusses on copying multiple values to different X selections
- Add completions similar to update though copying their approach does not work for me.