spm

Personal fork of spm (simple password manager)
git clone git@getsh.org:spm.git
Log | Files | Refs | README | LICENSE

commit 4324e70f6e39872d4ff238a1913363df4c4092e1
parent 63ad458e6e031c585f9ebc86de2d0abbc0214cf9
Author: Klemens Nanni <kl3@posteo.org>
Date:   Tue,  5 Jul 2016 02:45:53 +0200

Ship man page directly, no need for pod2man(1)

Instead of shipping README.pod which almost looks like spm.1 but has to
be converted first in order to install it, the man page is now shipped
directly.

Diffstat:
D.gitignore | 1-
MMakefile | 13+++----------
DREADME.pod | 117-------------------------------------------------------------------------------
Aspm.1 | 105+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 108 insertions(+), 128 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -1 +0,0 @@ -spm.1 diff --git a/Makefile b/Makefile @@ -1,4 +1,5 @@ # Copyright (C) 2013-2015 Sören Tempel +# Copyright (C) 2016 Klemens Nanni <kl3@posteo.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -18,12 +19,7 @@ PREFIX = /usr/local BINDIR = $(PREFIX)/bin MANDIR = $(PREFIX)/share/man -all: spm.1 -spm.1: README.pod - pod2man --section=1 --center="spm Manual" --name="spm" \ - --release="spm $(VERSION)" $< $@ - -install: spm.1 +install: install -Dm755 spm.sh "$(DESTDIR)$(BINDIR)/spm" install -Dm644 spm.1 "$(DESTDIR)$(MANDIR)/man1/spm.1" @@ -31,7 +27,4 @@ uninstall: $(RM) "$(DESTDIR)$(BINDIR)/spm" \ "$(DESTDIR)$(MANDIR)/man1/spm.1" -clean: - $(RM) spm.1 - -.PHONY: all install uninstall clean +.PHONY: install uninstall diff --git a/README.pod b/README.pod @@ -1,117 +0,0 @@ -=head1 NAME - -spm - simple password manager - -=head1 SYNOPSIS - -B<spm> I<COMMAND> [I<OPTION>] [I<ENTRY>|I<GROUP>] - -=head1 DESCRIPTION - -Adding, removing or showing a password is done by invoking spm with the -I<add>, I<del> or I<show> command respectively followed by a name. -spm will then prompt for a password or confirmation before it modifies -or shows the corresponding entry. - -Basic searching is possible through the I<search> command and will show -matching menu entries accordingly. - -Globbing is allowed for I<del>, I<search> and I<show> to avoid typing -potentially long entry names. In case multiple entries match, spm exits -without removing or showing any password but printing a warning instead. -Searching will show all matching paths. - -spm simply stores everything in a directory structure where passwords -correspond to individually PGP encrypted files, optionally residing -inside nested subdirectories of arbitrary depth, where any subdirectory -can be interpreted as a (sub)group to manage large collections easily. - -This allows for transparent integration with git(1) for example to keep -track of changes and/or add comments while editing passwords. - -Using ln(1) entries can be symlinked to indicate multiple accounts or -users share the same passphrase or create shortcuts to frequently used -entries for example. - -I<list> followed by a directory path, that is a group name, lists all -entries inside the specified group as well as all its subgroups. If not -name is given, all entries will be listed. Passing I<-g> as first -parameter causes it to list groups only. - -I<help> prints information about how to use spm. - -=head1 ENVIRONMENT - -=over 4 - -=item B<PASSWORD_STORE_DIR> - -The storage directory (default: ~/.spm/). - -=item B<PASSWORD_STORE_KEY> - -GPG key to encrypt files with (default: self). - -=back - -=head1 FILES - -=over 4 - -=item I<~/.spm/> - -The default storage directory. - -=back - -=head1 STDOUT - -Prompts, entry names and passwords are written to the standard output. - -=head1 STDERR - -The standard error is used for diagnostic messages only. - -=head1 EXIT STATUS - -spm returns 1 if an error occured otherwise 0. - -=head1 EXAMPLES - -Create a new entry with a random password using pwgen(1): - - $ pwgen -1 | spm add system/new-user - -Create a new entry called 'system/root': - - $ spm add system/root - -Write your 'system/root' password to standard output: - - $ spm show system/root - -Write the entry's password that matches the given pattern to standard -output: - - $ spm show em/r*t - $ spm show root - -Copy your 'system/root' password to the clipboard using xclip(1): - - $ spm show system/root | tr -d '\n' | xclip - -List all entries of the group 'system': - - $ spm list system - -List groups only: - - $ spm list -g - -Show all entries matching the pattern 'sys': - - $ spm search sys - -=head1 SEE ALSO - -git(1), gpg2(1), ln(1), pwgen(1), tpm(1), xclip(1) diff --git a/spm.1 b/spm.1 @@ -0,0 +1,105 @@ +.TH spm 1 2016-06-30 spm-1.4.4 "Commands Manual" +.SH NAME +spm \- simple password manager +.SH SYNOPSIS +\&\fBspm\fR \fI\s-1COMMAND\s0\fR [\fI\s-1OPTION\s0\fR] [\fI\s-1ENTRY\s0\fR|\fI\s-1GROUP\s0\fR] +.SH DESCRIPTION +Adding, removing or showing a password is done by invoking spm with the +\&\fIadd\fR, \fIdel\fR or \fIshow\fR command respectively followed by a name. +spm will then prompt for a password or confirmation before it modifies +or shows the corresponding entry. +.SH OPTIONS +Basic searching is possible through the \fIsearch\fR command and will show +matching menu entries accordingly. +.PP +Globbing is allowed for \fIdel\fR, \fIsearch\fR and \fIshow\fR to avoid typing +potentially long entry names. In case multiple entries match, spm exits +without removing or showing any password but printing a warning instead. +Searching will show all matching paths. +.PP +spm simply stores everything in a directory structure where passwords +correspond to individually \s-1PGP\s0 encrypted files, optionally residing +inside nested subdirectories of arbitrary depth, where any subdirectory +can be interpreted as a (sub)group to manage large collections easily. +.PP +This allows for transparent integration with \fIgit\fR\|(1) for example to keep +track of changes and/or add comments while editing passwords. +.PP +Using \fIln\fR\|(1) entries can be symlinked to indicate multiple accounts or +users share the same passphrase or create shortcuts to frequently used +entries for example. +.PP +\&\fIlist\fR followed by a directory path, that is a group name, lists all +entries inside the specified group as well as all its subgroups. If not +name is given, all entries will be listed. Passing \fI\-g\fR as first +parameter causes it to list groups only. +.PP +\&\fIhelp\fR prints information about how to use spm. +.SH EXIT STATUS +spm returns 1 if an error occured otherwise 0. +.SH ENVIRONMENT +.TP +PASSWORD_STORE_DIR +The storage directory (default: ~/.spm/). +.TP +PASSWORD_STORE_KEY +GPG key to encrypt files with (default: self). +.SH FILES +.TP +~/.spm/ +The default storage directory. +.SH STDOUT +Prompts, entry names and passwords are written to the standard output. +.SH STDERR +The standard error is used for diagnostic messages only. +.SH EXAMPLES +Create a new entry with a random password using \fIpwgen\fR\|(1): +.PP +.Vb 1 +\& $ pwgen \-1 | spm add system/new\-user +.Ve +.PP +Create a new entry called 'system/root': +.PP +.Vb 1 +\& $ spm add system/root +.Ve +.PP +Write your 'system/root' password to standard output: +.PP +.Vb 1 +\& $ spm show system/root +.Ve +.PP +Write the entry's password that matches the given pattern to standard +output: +.PP +.Vb 1 +\& $ spm show em/r*t +.Ve +.PP +Copy your 'system/root' password to the clipboard using \fIxclip\fR\|(1): +.PP +.Vb 1 +\& $ spm show system/root | tr \-d \*(Aq\en\*(Aq | xclip +.Ve +.PP +List all entries of the group 'system': +.PP +.Vb 1 +\& $ spm list system +.Ve +.PP +List groups only: +.PP +.Vb 1 +\& $ spm list \-g +.Ve +.PP +Show all entries matching the pattern 'sys': +.PP +.Vb 1 +\& $ spm search sys +.Ve +.SH SEE ALSO +\&\fIgit\fR\|(1), \fIgpg2\fR\|(1), \fIln\fR\|(1), \fIpwgen\fR\|(1), \fItpm\fR\|(1), \fIxclip\fR\|(1)