summaryrefslogtreecommitdiff
path: root/README.org
blob: 0f4dd2e47ee93124c34a1b26bc276b5896737f7f (plain)
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
* kasi.el --- emacs secrets manager ("veil"/"conceal" in Esperanto)
A simple password manager written in Emacs Lisp (rewrite of previous
[[https://git.vineetk.net/kasi/][kasi]] in POSIX shell).

** Dependencies
- Emacs
- Any package that provides transparent decryption of files on
  opening, such as [[https://github.com/anticomputer/age.el][age.el]] or built-in gnupg

** Configuration
You can set the base directory that contains your files via the custom
variable =kasi-dir=.

The password files themselves are stored under =kasi-dir= like so and
listed via =*/*= wildcard:
#+begin_src
  category1/
  - file1
  - file2
  category2/
  - file1
  - file2
#+end_src

** File Format
For ease of parsing, the decrypted password files are S-expressions of
the following format:
#+begin_src lisp
  ((password "redacted")
   (username "coolname")
   (email "bob@example.org")
   (totp "base32string")
   (extra-notes "other stuff to encrypt"))
#+end_src

** Accessing From Other Programs
To parse and read the values of the secret files (like ='password= or
='username=), you can run something similar to the following command:
#+begin_src shell
  emacsclient -e "(kasi-get \"category/file\" 'password)" | sed 's/^"//; s/"$//'
#+end_src
Unfortunately, I was not able to find a way to make =emacsclient=
print without the return value's type (i.e. without double quotes),
which does make this more clunky for outside Emacs. +Obviously the
solution to this is to just remove them and rewrite those programs in
Emacs Lisp.+

** Never Asked Questions (NAQ)
*** Why should I use this over any other password manager?
Don't. For a serious answer, it's because this uses S-expressions for
the password format.