commit 83b554a

Emilia Smólska  ·  2026-06-11 14:40:27 +0000 UTC
parent 51caf74
Makefile, manual page
2 files changed,  +79, -0
+27, -0
 1@@ -0,0 +1,27 @@
 2+.POSIX:
 3+.SUFFIXES:
 4+
 5+PROG=haslo
 6+MAN=haslo.1
 7+
 8+CP=cp
 9+
10+PREFIX=/usr/local
11+BINDIR=${PREFIX}/bin
12+MANDIR=${PREFIX}/man
13+MAN1=${MANDIR}/man1
14+
15+PERLSHEBANG=/usr/bin/env perl
16+
17+PERLMODS=MIME::Base64 Term::ReadKey
18+
19+all: checkmods
20+
21+checkmods:
22+	@echo === Checking Perl modules
23+	for m in ${PERLMODS}; do ${PERLSHEBANG} -M$$m -e0; done
24+
25+install:
26+	sed '1s:.*:#!${PERLSHEBANG}:' ${PROG} > ${BINDIR}/${PROG}
27+	chmod +x ${BINDIR}/${PROG}
28+	cp ${MAN} ${MAN1}/${MAN}
+52, -0
 1@@ -0,0 +1,52 @@
 2+.Dd $Mdocdate$
 3+.Dt HASLO 1
 4+.Os
 5+.Sh NAME
 6+.Nm haslo
 7+.Nd a simple password manager
 8+.Sh SYNOPSIS
 9+.Nm
10+.Cm gen |
11+.Cm get |
12+.Cm put
13+.Ar name
14+.Nm
15+.Cm list
16+.Sh DESCRIPTION
17+The
18+.Nm
19+utility creates and retrieves PGP-encrypted passwords. The commands are as follows:
20+.Bl -tag -width Ds
21+.It Cm gen Ar name
22+Generate a random password for
23+.Ar name ,
24+using 128 bytes of entropy from
25+.Pa /dev/urandom .
26+.It Cm get Ar name
27+Retrieve and print to the standard output the generated or created password for
28+.Ar name .
29+.It Cm put Ar name
30+Create a password for
31+.Ar name ,
32+prompting the user for the password and confirmation.
33+.It Cm list
34+List all stored passwords.
35+.El
36+.Sh ENVIRONMENT
37+.Bl -tag -width Ds
38+.It Ev HASLOEMAIL
39+The email address used by
40+.Xr gpg 1
41+to encrypt and decrypt the passwords.
42+.It Ev HASLODIR
43+The directory used to store passwords. Defaults to
44+.Pa ~/.haslo .
45+.El
46+.Sh EXIT STATUS
47+.Ex -std
48+.Sh SEE ALSO
49+.Xr gpg 1 ,
50+.Xr xclip 1 ,
51+.Xr urandom 4
52+.Sh AUTHORS
53+.An Emilia Smólska Aq Mt emilia@hopeserv.net