* 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.