kasi.el

This package provides an easy way to manage secrets via M-x kasi.
Log | Files | Refs | LICENSE

README.org (1698B)


      1 * kasi.el --- emacs secrets manager ("veil"/"conceal" in Esperanto)
      2 A simple password manager written in Emacs Lisp (rewrite of previous
      3 [[https://git.vineetk.net/kasi/][kasi]] in POSIX shell).
      4 
      5 ** Dependencies
      6 - Emacs
      7 - Any package that provides transparent decryption of files on
      8   opening, such as [[https://github.com/anticomputer/age.el][age.el]] or built-in gnupg
      9 
     10 ** Configuration
     11 You can set the base directory that contains your files via the custom
     12 variable =kasi-dir=.
     13 
     14 The password files themselves are stored under =kasi-dir= like so and
     15 listed via =*/*= wildcard:
     16 #+begin_src
     17   category1/
     18   - file1
     19   - file2
     20   category2/
     21   - file1
     22   - file2
     23 #+end_src
     24 
     25 ** File Format
     26 For ease of parsing, the decrypted password files are S-expressions of
     27 the following format:
     28 #+begin_src lisp
     29   ((password "redacted")
     30    (username "coolname")
     31    (email "bob@example.org")
     32    (totp "base32string")
     33    (extra-notes "other stuff to encrypt"))
     34 #+end_src
     35 
     36 ** Accessing From Other Programs
     37 To parse and read the values of the secret files (like ='password= or
     38 ='username=), you can run something similar to the following command:
     39 #+begin_src shell
     40   emacsclient -e "(kasi-get \"category/file\" 'password)" | sed 's/^"//; s/"$//'
     41 #+end_src
     42 Unfortunately, I was not able to find a way to make =emacsclient=
     43 print without the return value's type (i.e. without double quotes),
     44 which does make this more clunky for outside Emacs. +Obviously the
     45 solution to this is to just remove them and rewrite those programs in
     46 Emacs Lisp.+
     47 
     48 ** Never Asked Questions (NAQ)
     49 *** Why should I use this over any other password manager?
     50 Don't. For a serious answer, it's because this uses S-expressions for
     51 the password format.