spm

simple password manager
git clone anongit@rnpnr.xyz:spm.git
Log | Files | Refs | Feed | README | LICENSE

spm.1 (3188B)


      1 .Dd April 21, 2017
      2 .Dt SPM 1
      3 .Os
      4 .Sh NAME
      5 .Nm spm
      6 .Nd simple password manager
      7 .Sh SYNOPSIS
      8 .Nm
      9 .Cm add Oo Ar group/ Oc Ns Ar entry
     10 .Nm
     11 .Cm del Ar expression
     12 .Nm
     13 .Cm help
     14 .Nm
     15 .Cm list Oc Op Ar group
     16 .Nm
     17 .Cm search Ar expression
     18 .Nm
     19 .Cm show Ar expression
     20 .Sh DESCRIPTION
     21 .Nm
     22 is a fully POSIX shell compliant script using
     23 .Xr gpg2 1
     24 for encryption.
     25 .sp
     26 Entries are stored in a classical filesystem hierarchy where passwords
     27 are encrypted as individual files and directories may be used as groups.
     28 This way users can control access through file ownership, share entries
     29 entries with symbolic links and more just like any other files.
     30 .sp
     31 Group and entry names or expressions are considered relative to the
     32 storage root directory.
     33 .Ar expression
     34 is interpreted as basic regular expression according to
     35 .Xr re_format 7 .
     36 The following commands are available:
     37 .Bl -tag -width Ds
     38 .It Cm add
     39 Prompt for a password if standard output is a terminal otherwise read
     40 from standard input and store it as
     41 .Ar entry .
     42 If
     43 .Ar group
     44 is specified, non-existing groups are created automatically and the
     45 password is stored under
     46 .Ar group/ Ns Op Ar ../ .
     47 .It Cm del
     48 Delete the entry matching
     49 .Ar expression
     50 on success.
     51 .It Cm list
     52 Print a recursive list of all entries in
     53 .Ar group .
     54 If
     55 .Ar group
     56 is omitted, the entire storage root is listed.
     57 .It Cm search
     58 Print the absolute paths of all entries matching
     59 .Ar expression
     60 one per line.
     61 .It Cm show
     62 Print the password to standard output if
     63 .Ar expression
     64 uniquely matches an entry and prompt for the decryption passphrase if
     65 it is not cached by
     66 .Xr gpg-agent 1
     67 already.
     68 .El
     69 .Sh ENVIRONMENT
     70 The following environment variables will be used by
     71 .Nm
     72 if they are set and not empty:
     73 .Bl -tag -width Ds
     74 .It Ev PASSWORD_STORE_DIR
     75 The storage root directory.
     76 This should be an absolute path.
     77 .It Ev PASSWORD_STORE_KEY
     78 Key ID used for de/encryption.
     79 Refer to
     80 .Xr gpg2 1
     81 for accepted formats.
     82 .El
     83 .Sh FILES
     84 .Bl -tag -width Ds
     85 .It Pa ~/.spm/
     86 The default storage root directory.
     87 .El
     88 .Sh EXIT STATUS
     89 .Nm
     90 exits 1 if an error occurs otherwise 0.
     91 .Sh EXAMPLES
     92 Add Alice's password to the group
     93 .Em users :
     94 .Bd -literal -offset indent
     95 $ spm add users/alice
     96 Password for 'users/alice':
     97 .Ed
     98 .sp
     99 Make sure she is an admin as well:
    100 .Bd -literal -offset indent
    101 $ (cd ~/.spm
    102 > mkdir admins
    103 > ln -s ../members/alice admins/alice)
    104 .Ed
    105 .sp
    106 Copy her password into the X selection ready to be pasted somewhere:
    107 .Bd -literal -offset indent
    108 $ spm show admins/alice | xclip -i
    109 .Ed
    110 .sp
    111 Find all admins starting with
    112 .Dq a
    113 or
    114 .Dq b :
    115 .Bd -literal -offset indent
    116 $ spm search admins/[ab]
    117 /home/alice/.spm/admins/alice
    118 /home/alice/.spm/admins/bob
    119 .Ed
    120 .sp
    121 List all users:
    122 .Bd -literal -offset indent
    123 $ spm list users
    124 /home/alice/.spm/users/alice
    125 /home/alice/.spm/users/bob
    126 /home/alice/.spm/users/temporary/tim
    127 /home/alice/.spm/users/temporary/tom
    128 .Ed
    129 .sp
    130 Find entries interactively using
    131 .Xr dmenu 1 :
    132 .Bd -literal -offset indent
    133 $ spm show "$(spm list | dmenu -l 10)"
    134 .Ed
    135 .Sh SEE ALSO
    136 .Xr dmenu 1 ,
    137 .Xr gpg-agent 1 ,
    138 .Xr gpg2 1 ,
    139 .Xr tpm 1 ,
    140 .Xr re_format 7
    141 .Sh AUTHORS
    142 .Nm
    143 is written by
    144 .An Klemens Nanni Aq Mt kl3@posteo.org .
    145 .Sh CAVEATS
    146 Groups have to be deleted manually using
    147 .Xr rmdir 1 .