.\" .\" Copyright (c) 2015 Paul Fariello .\" .\" Permission to use, copy, modify, and distribute this software for any .\" purpose with or without fee is hereby granted, provided that the above .\" copyright notice and this permission notice appear in all copies. .\" .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" .Dd May 5, 2017 .Dt KICKPASS 1 .Os .Sh NAME .Nm kickpass .Nd a stupid simple password safe .Sh SYNOPSIS .Nm .Oo Fl hv Oc .Nm .Cm help Oo Ar command Oc .Nm .Cm init Oo Ar sub Oc .Nm .Cm cat Oo Fl p Oc Ar safe .Nm .Cm create Oo Fl gl Ar len Oc Ar safe .Nm .Cm open Oo Fl t Oc Ar safe .Nm .Cm edit Oo Fl pmgl Oc Ar safe .Nm .Cm copy Ar safe .Nm .Cm list Oo Ar path Oc .Nm .Cm delete Ar safe .Nm .Cm agent Oo Fl d Oc Oo Ar command Oo Ar arg ... Oc Oc .Sh DESCRIPTION .Nm is a stupid simple password safe. It keep each password in a specific safe, protected with modern cryptography. Command line interface is splited into different command. Each is described in the following subsections. .Ss WORKSPACE All safes are stored in kickpass workspace. Default workspace is .Pa $HOME/.kickpass/ \&. .Ss SAFE NAMING Safe name can contains any character allowed by the file system containing the kickpass workspace. If safe name contains .Sq / then corresponding directories will be created under kickpass workspace. For example the following command .Bd -literal -offset indent kickpass create www/my-personnal-website .Ed .Pp will create a safe in .Pa $HOME/.kickpass/www/my-personnal-website \&. While following command .Bd -literal -offset indent kickpass list www .Ed .Pp will list all safe under the directory .Pa $HOME/.kickpass/www/ \&. .Ss Nm Oo Fl hv Oc Don't do anything .Bl -tag -width flag .It Fl v Fl -version Print .Nm version .It Fl h Fl -help Print .Nm help .El .Ss Nm Cm help Oo Ar command Oc Print general help or command help. .Ss Nm Cm init Oo Ar sub Oc Initialize a .Nm workspace or a sub-workspace. .Ss Nm Cm cat Oo Fl p Oc Ar safe Open .Ar safe and print .Ar safe metadata to stdout. .Bl -tag -width flag .It Fl p Fl -password Print the password to stdout .El .Ss Nm Cm create Oo Fl gl Oc Ar safe Create a new password safe. .Bl -tag -width flag .It Fl g Fl -generate Create a new safe with a generated random password .It Fl l Fl -length Ar len Generate a random password of .Ar len length .El .Ss Nm Cm open Oo Fl t Oc Ar safe Open .Ar safe and load it in .Nm agent .Bl -tag -width flag .It Fl t Fl -timeout Sets the lifetime of the opened safe in the agent. Default in seconds (3600s). .El .Ss Nm Cm edit Oo Fl pmgl Oc Ar safe Prompt for a new password and edit metadata from .Ar safe using .Ev EDITOR environment variable .Bl -tag -width flag .It Fl p Fl -password Edit only password .It Fl m Fl -metadata Edit only metadata .It Fl g Fl -generate Create a new safe with a generated random password .It Fl l Fl -length Ar len Generate a random password of .Ar len length .El .Ss Nm Cm copy Ar safe Copy .Ar safe password into X primary and secondary clipboards. Password can be pasted only once. .Ss Nm Cm list Oo Ar path Oc List available safes starting from .Ar path relatively to .Nm workspace or from root of .Nm workspace if .Ar path is not given. .Ss Nm Cm delete Oo Fl f Oc Ar safe Delete .Ar safe \&. .Ss Nm Cm agent Oo Fl d Oc Oo Ar command Oo arg ... Oc Oc Start a .Nm agent that will store your opened safe. Agent can be used by exporting .Ev KP_AGENT_SOCK environment variable. Optionally starts .Ar command with the correct environment set. .Bl -tag -width flag .It Fl d Fl -version Do not daemonize agent. .El .Sh ENVIRONMENT The following variables are used by kickpass: .Bl -tag -width BLOCKSIZE .It Ev HOME The user's login directory. Used to compute .Nm workspace path. .It Ev EDITOR The user's preferred utility to edit text files. Used to edit safe. .It Ev KP_AGENT_SOCK Socket used to communicate with .Nm agent. Path to socket is printed to stdout when at agent startup. .El .Sh FILES The following files and directories are used by kickpass: .Bl -tag -width BLOCKSIZE .It Pa $HOME/.kickpass/ The .Nm working directory. .El .Sh EXAMPLES Initialize a .Nm workspace. .Bd -literal -offset indent kickpass init .Ed Create a new safe with a random password. .Bd -literal -offset indent kickpass create -g www/my_safe .Ed Display safe content on stdout. .Bd -literal -offset indent kickpass cat www/my_safe .Ed Edit a safe. .Bd -literal -offset indent kickpass edit www/my_safe .Ed Copy password contained in safe into X clipboards. .Bd -literal -offset indent kickpass copy www/my_safe .Ed .Sh AUTHORS .Nm is written by .An Paul Fariello Aq Mt paul@fariello.eu \&.