Skip to content

Commit a4e9ccb

Browse files
committed
docs: overhaul README.md and showcase new features
1 parent 14e8178 commit a4e9ccb

File tree

1 file changed

+117
-71
lines changed

1 file changed

+117
-71
lines changed

README.md

+117-71
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,104 @@
1+
<img alt="password store logo" src="https://git.sr.ht/~ayushnix/pass-tessen/blob/master/images/pass-logo-128.png" align="right" width="128" height="128">
2+
13
## pass-tessen
24

3-
A [pass](https://www.passwordstore.org/) extension that uses [fzf](https://github.com/junegunn/fzf)
4-
to select and copy password store data.
5+
`pass-tessen` is a [password store][1] extension that uses a fuzzy data selection menu to copy
6+
password store data while using a terminal. `pass-tessen` can open URLs in a web browser of your
7+
choice, generate OTPs using [pass-otp][2], and copy all [valid key-value pair data][3] in a password
8+
store file. The fuzzy data selection menu can be either [fzf][4], [skim][5], or [fzy][6].
9+
10+
If you want to autotype and copy password store and [gopass][21] data on Wayland wlroots compositors
11+
like [sway][7], check out [tessen][8]. If you're using Xorg/X11 window managers, check out
12+
[rofi-pass][9].
13+
14+
## Why use `pass-tessen`?
15+
16+
- unlike [pass-clip][10], `pass-tessen` can copy all valid key-value pair data in a password store
17+
file
18+
19+
For example, if you have something like
20+
21+
```
22+
$ pass show mybank/username
23+
correct horse battery staple
24+
url: https://mybank.com
25+
credit card number: 1111 1111 1111 1111
26+
otpauth://totp/ACME%20Co:[email protected]?secret=HXDMVJECJJWSRB3HWIZR4IFUGFTMXBOZ&issuer=ACME%20Co&algorithm=SHA1&digits=6&period=30
27+
```
28+
29+
`pass-tessen` can copy the value of `credit card number` key
30+
31+
- `pass-tessen` can generate and copy OTPs if [pass-otp][2] is installed
32+
33+
- `pass-tessen` can open URLs using [xdg-open][11] or any other web browser of your choice
34+
35+
- `pass-tessen` can show a preview of your password store data before you select it
536

6-
If you want to autotype and copy password-store data, similar to how
7-
[rofi-pass](https://github.com/carnager/rofi-pass) works, check out
8-
[tessen](https://github.com/ayushnix/tessen).
37+
<picture>
38+
<source srcset="https://git.sr.ht/~ayushnix/pass-tessen/blob/master/images/preview-dark.jpg" media="(prefers-color-scheme: dark)" height="167" width="721">
39+
<img alt="pass-tessen preview showcase" src="https://git.sr.ht/~ayushnix/pass-tessen/blob/master/images/preview-light.jpg" height="168" width="720">
40+
</picture>
941

10-
`pass-tessen` will automatically use the following environment variables if they're set or assume
11-
reasonable defaults if not.
42+
- focuses on doing one thing well, copying password store data while using a terminal
1243

13-
- `PASSWORD_STORE_DIR` (the default location of your password store)
14-
- `PASSWORD_STORE_CLIP_TIME` (the amount of time for which password-store data stays on the
15-
clipboard)
44+
- `pass-tessen` doesn't use any external dependencies unless absolutely necessary
45+
46+
As a result, `pass-tessen` doesn't depend on commonly used utilities like coreutils, sed, awk, and
47+
find (although password store needs them).
48+
49+
- the code is linted using [shellcheck][12] and formatted using [shfmt][13]
50+
51+
- focuses on minimalism and security (please let me know if you have any suggestions for
52+
improvement)
1653

1754
## Installation
1855

19-
Before installing `pass-tessen`, make sure you've added the following line in `~/.bash_profile` or
20-
an equivalent file and have logged out and logged back in.
56+
Before installing `pass-tessen`, make sure that the environment variable
57+
`PASSWORD_STORE_ENABLE_EXTENSIONS` is set to `true`. This can be confirmed by executing,
58+
59+
```
60+
env | grep PASSWORD_STORE_ENABLE_EXTENSIONS
61+
```
62+
63+
If there's no output, add the following line in `~/.bash_profile` assuming you're using bash and
64+
re-login.
2165

2266
```
2367
export PASSWORD_STORE_ENABLE_EXTENSIONS=true
2468
```
2569

26-
Password Store extensions will not work if this environment variable isn't set.
70+
If this environment variable isn't set, password store extensions will not work. For more details,
71+
please read the man page of `PASS(1)`.
2772

2873
### Dependencies
2974

30-
- [pass](https://git.zx2c4.com/password-store/)
31-
- [fzf](https://github.com/junegunn/fzf)
32-
- [xclip](https://github.com/astrand/xclip) (if you're using X11/Xorg)
33-
- [wl-clipboard](https://github.com/bugaevc/wl-clipboard) or
34-
[wl-clipboard-rs](https://github.com/YaLTeR/wl-clipboard-rs) (if you're using Wayland)
75+
- [pass][1]
76+
- at least one fuzzy data selection backend is needed - either [fzf][4], [skim][5], or [fzy][6]
77+
- at least one copy paste program is needed - either [wl-clipboard][15] if you're using a Wayland
78+
compositor or [xclip][14] if you're using Xorg/X11
79+
- [xdg-utils][11] (optional, if you want to open URLs using `xdg-open`)
80+
- [pass-otp][2] (optional, if you want to generate and copy TOTP/HOTP)
3581

3682
### Arch Linux
3783

38-
`pass-tessen` is available in the [Arch User
39-
Repository](https://aur.archlinux.org/packages/pass-tessen/).
84+
`pass-tessen` is available in the [Arch User Repository][17].
4085

4186
### Git Release
4287

4388
```
44-
git clone https://github.com/ayushnix/pass-tessen.git
89+
git clone https://git.sr.ht/~ayushnix/pass-tessen
4590
cd pass-tessen
4691
sudo make install
4792
```
4893

49-
You can also do `doas make install` if you're using [doas](https://github.com/Duncaen/OpenDoas),
50-
which you probably should.
94+
You can also do `doas make install` if you're using [doas][18] on Linux, which you probably should.
5195

5296
### Stable Release
5397

5498
```
55-
wget https://github.com/ayushnix/pass-tessen/releases/download/v1.5.3/pass-tessen-1.5.3.tar.gz
56-
tar xvzf pass-tessen-1.5.3.tar.gz
57-
cd pass-tessen-1.5.3
99+
wget https://git.sr.ht/~ayushnix/pass-tessen/archive/v2.0.0.tar.gz
100+
tar xvzf pass-tessen-2.0.0.tar.gz
101+
cd pass-tessen-2.0.0
58102
sudo make install
59103
```
60104

@@ -63,58 +107,38 @@ or, you know, `doas make install`.
63107
## Usage
64108

65109
```
66-
Usage: pass tessen [-p|--preview] [-h|--help] [-v|--version]
67-
-p, --preview: show preview of password data
68-
-h, --help: print this help menu
69-
-v, --version: print the version of pass tessen
110+
usage: pass tessen [-p|--preview] [-f|--fuzzy fuzzy_backend_program]
111+
[-u|--userkey custom_username_key]
112+
[-U|--urlkey custom_url_key]
113+
[-w|--web-browser custom_web_browser] [-h|--help]
114+
[-v|--version]
115+
116+
pass tessen find a fuzzy selection program and show pass data
117+
pass tessen -p show preview while selecting a pass file
118+
pass tessen -p -f sk use skim as fuzzy backend and show preview
119+
pass tessen -f fzy use fzy as fuzzy backend; doesn't support preview
120+
pass tessen -u username set 'username' as the custom username key
121+
pass tessen -U URL set 'URL' as the custom URL key
122+
pass tessen -w qutebrowser use qutebrowser to open URLs
123+
pass tessen -h show this help menu
124+
pass tessen -v show the version of pass tessen
70125
```
71126

72-
## Why should I use this instead of [pass-clip](https://github.com/ibizaman/pass-clip)?
73-
74-
- pass-tessen can copy other key-value pair data, not just passwords
75-
76-
For example, if you have something like
77-
78-
```
79-
$ pass show mybank/username
80-
correct horse battery staple
81-
url: https://mybank.com
82-
credit card number: 1111 1111 1111 1111
83-
```
84-
85-
pass tessen can copy your `username`, `url`, and `credit card number` as well
86-
87-
- pass-tessen can show a preview of your password-store data before you select it
88-
89-
just use `pass tessen -p` to see a preview of your password store data before you make a selection
90-
- focuses on doing one thing well, copying password store data as conveniently and quickly as
91-
possible while using a terminal
92-
- you don't need `sed`, `find`, GNU coreutils, or anything else besides what's mentioned above to
93-
run pass-tessen (although `pass` needs all of those binaries)
94-
- the code is linted using [shellcheck](https://github.com/koalaman/shellcheck) and formatted using
95-
[shfmt](https://github.com/mvdan/sh)
96-
- focuses on minimalism and security (please let me know if you have any suggestions for
97-
improvement)
98-
99127
## Assumptions
100128

101-
`pass-tessen` works under several assumptions and tries to fail gracefully if they are not met.
102-
Please report any unexpected behavior.
103-
104-
The data organization format is assumed to be the same as mentioned on this
105-
[page](https://www.passwordstore.org/). If valid key-value pairs aren't found, `pass-tessen` will
106-
not show them.
107-
108-
It is assumed that the name of the file itself is the username. For example, if you have a file
109-
`bank/mybankusername.gpg` in your password store, the assumed default username is `mybankusername`.
110-
However, if a valid username key value pair is present inside the file, `pass-tessen` will show them
111-
for selection as well.
129+
`pass-tessen` assumes that the data organization format in a password store file is the same as
130+
mentioned on the [password store website][3]. If a key is not detected, please raise a ticket on a
131+
git forge website of your choice where `pass-tessen` is hosted.
112132

113-
If there are multiple non-unique keys, the value of the last key will be considered.
133+
The `password` key is reserved in a case-insensitive manner to avoid confusion. The custom username
134+
and URL keys are also checked in a case-insensitive manner and the first unique key is selected. If
135+
a custom username key is not mentioned, `user` is assumed. If a custom URL key is not mentioned,
136+
`url` is assumed. If a username key is not found, the basename of the selected password store
137+
(without the `.gpg` extension) is considered as the username.
114138

115139
## What does `tessen` mean?
116140

117-
[Here](https://en.wikipedia.org/wiki/Japanese_war_fan) you go.
141+
[Here you go.][20]
118142

119143
## Why did you choose this weird name?
120144

@@ -124,4 +148,26 @@ of Japanese hand fans. I guess I was thinking of some anime while coming up with
124148

125149
## Contributions
126150

127-
Please see [this](https://github.com/ayushnix/pass-tessen/blob/master/CONTRIBUTING.md) file.
151+
Please see the [CONTRIBUTING.md file][19].
152+
153+
[1]: https://www.passwordstore.org/
154+
[2]: https://github.com/tadfisher/pass-otp
155+
[3]: https://www.passwordstore.org/#organization
156+
[4]: https://github.com/junegunn/fzf
157+
[5]: https://github.com/lotabout/skim
158+
[6]: https://github.com/jhawthorn/fzy
159+
[7]: https://swaywm.org/
160+
[8]: https://git.sr.ht/~ayushnix/tessen
161+
[9]: https://github.com/carnager/rofi-pass
162+
[10]: https://github.com/ibizaman/pass-clip
163+
[11]: https://www.freedesktop.org/wiki/Software/xdg-utils/
164+
[12]: https://github.com/koalaman/shellcheck
165+
[13]: https://github.com/mvdan/sh
166+
[14]: https://github.com/astrand/xclip
167+
[15]: https://github.com/bugaevc/wl-clipboard
168+
[16]: https://github.com/YaLTeR/wl-clipboard-rs
169+
[17]: https://aur.archlinux.org/packages/pass-tessen/
170+
[18]: https://github.com/Duncaen/OpenDoas
171+
[19]: https://git.sr.ht/~ayushnix/pass-tessen/tree/master/item/CONTRIBUTING.md
172+
[20]: https://en.wikipedia.org/wiki/Japanese_war_fan
173+
[21]: https://github.com/gopasspw/gopass

0 commit comments

Comments
 (0)