PASS(1)
๐ NAME ๐
pass โ stores, retrieves, generates, and synchronizes passwords securely โจ bestie, this is the pass(1) page, and it's literally your password-store bestie.
โจ SYNOPSIS โจ
pass [ COMMAND ] [ OPTIONS ]... [ ARGS ]...
๐ธ DESCRIPTION ๐ธ
Okay so pass is a very simple password store that keeps passwords inside gpg2(1) encrypted files inside a simple directory tree residing at ~/.password-store. The pass utility provides a series of commands for manipulating the password store, allowing the user to add, remove, edit, synchronize, generate, and manipulate passwords. ๐
If no COMMAND is specified, COMMAND defaults to either show or ls, depending on the type of specifier in ARGS. Alternatively, if PASSWORD_STORE_ENABLE_EXTENSIONS is set to "true", and the file .extensions/COMMAND.bash exists inside the password store and is executable, then it is sourced into the environment, passing any arguments and environment variables. Extensions existing in a system-wide directory, only installable by the administrator, are always enabled. ๐ซถ
Otherwise COMMAND must be one of the valid commands listed below.
Several of the commands below rely on or provide additional functionality if the password store directory is also a git repository. If the password store directory is a git repository, all password store modification commands will cause a corresponding git commit. Sub-directories may be separate nested git repositories, and pass will use the inner-most directory relative to the current password. See the EXTENDED GIT EXAMPLE section for a detailed description using init and git(1).
The init command must be run before other commands in order to initialize the password store with the correct gpg key id. Passwords are encrypted using the gpg key set with init.
There is a corresponding bash completion script for use with tab completing password names in bash(1).
๐ COMMANDS ๐
Here's the command menu, bestie โ every single one is iconic in its own way. ๐
๐ init
init [ --path=sub-folder, -p sub-folder ] gpg-id...
Initialize new password storage and use gpg-id for encryption. Multiple gpg-ids may be specified, in order to encrypt each password with multiple ids. This command must be run first before a password store can be used. If the specified gpg-id is different from the key used in any existing files, these files will be reencrypted to use the new id.
๐ก Note: use of gpg-agent(1) is recommended so that the batch decryption does not require as much user intervention.
--path=sub-folder,-psub-folder โ if specified, along with an argument, a specificgpg-idor set ofgpg-ids is assigned for that specific sub folder of the password store.gpg-id...โ the id(s) used for encryption.- empty string
gpg-idโ if only onegpg-idis given, and it is an empty string, then the current.gpg-idfile for the specified sub-folder (or root if unspecified) is removed.
๐ ls
ls subfolder
List names of passwords inside the tree at subfolder by using the tree(1) program. This command is alternatively named list.
๐ grep
grep [GREPOPTIONS] search-string
Searches inside each decrypted password file for search-string, and displays line containing matched string along with filename. Uses grep(1) for matching. GREPOPTIONS are passed to grep(1) as-is. (Note: the GREP_OPTIONS environment variable functions as well.)
๐ find
find pass-names...
List names of passwords inside the tree that match pass-names by using the tree(1) program. This command is alternatively named search.
๐ show
show [ --clip[=line-number], -c[line-number] ] [ --qrcode[=line-number], -q[line-number] ] pass-name
Decrypt and print a password named pass-name.
--clip[=line-number],-c[line-number]โ do not print the password but instead copy the first (or otherwise specified) line to the clipboard usingxclip(1)orwl-clipboard(1)and then restore the clipboard after 45 (orPASSWORD_STORE_CLIP_TIME) seconds.--qrcode[=line-number],-q[line-number]โ do not print the password but instead display a QR code usingqrencode(1)either to the terminal or graphically if supported.pass-nameโ the password to decrypt and print.
๐ insert
insert [ --echo, -e | --multiline, -m ] [ --force, -f ] pass-name
Insert a new password into the password store called pass-name. This will read the new password from standard in.
--echo,-eโ when this is not specified, disable keyboard echo when the password is entered and confirm the password by asking for it twice.--multiline,-mโ lines will be read until EOF or Ctrl+D is reached. Otherwise, only a single line from standard in is read.--force,-fโ prompt before overwriting an existing password, unless--forceor-fis specified.pass-nameโ the name of the new password.
This command is alternatively named add.
๐ edit
edit pass-name
Insert a new password or edit an existing password using the default text editor specified by the environment variable EDITOR or using vi(1) as a fallback. This mode makes use of temporary files for editing, but care is taken to ensure that temporary files are created in /dev/shm in order to avoid writing to difficult-to-erase disk sectors. If /dev/shm is not accessible, fallback to the ordinary TMPDIR location, and print a warning. ๐ญ
๐ generate
generate [ --no-symbols, -n ] [ --clip, -c ] [ --in-place, -i | --force, -f ] pass-name [pass-length]
Generate a new password using /dev/urandom of length pass-length (or PASSWORD_STORE_GENERATED_LENGTH if unspecified) and insert into pass-name.
--no-symbols,-nโ do not use any non-alphanumeric characters in the generated password. The character sets used in generating passwords can be changed with thePASSWORD_STORE_CHARACTER_SETandPASSWORD_STORE_CHARACTER_SET_NO_SYMBOLSenvironment variables, described below.--clip,-cโ do not print the password but instead copy it to the clipboard usingxclip(1)orwl-clipboard(1)and then restore the clipboard after 45 (orPASSWORD_STORE_CLIP_TIME) seconds.--qrcode,-qโ do not print the password but instead display a QR code usingqrencode(1)either to the terminal or graphically if supported.--in-place,-iโ do not interactively prompt, and only replace the first line of the password file with the new generated password, keeping the remainder of the file intact.--force,-fโ prompt before overwriting an existing password, unless--forceor-fis specified.pass-nameโ where the generated password gets inserted.pass-lengthโ how long the generated password should be.
๐ rm
rm [ --recursive, -r ] [ --force, -f ] pass-name
Remove the password named pass-name from the password store. This command is alternatively named remove or delete.
--recursive,-rโ deletepass-namerecursively if it is a directory.--force,-fโ do not interactively prompt before removal.pass-nameโ the password to remove.
๐ mv
mv [ --force, -f ] old-path new-path
Renames the password or directory named old-path to new-path. This command is alternatively named rename.
--force,-fโ if--forceis specified, silently overwritenew-pathif it exists.- trailing
/โ ifnew-pathends in a trailing/, it is always treated as a directory. old-pathโ the path to rename from.new-pathโ the path to rename to.
Passwords are selectively reencrypted to the corresponding keys of their new destination.
๐ cp
cp [ --force, -f ] old-path new-path
Copies the password or directory named old-path to new-path. This command is alternatively named copy.
--force,-fโ if--forceis specified, silently overwritenew-pathif it exists.- trailing
/โ ifnew-pathends in a trailing/, it is always treated as a directory. old-pathโ the path to copy from.new-pathโ the path to copy to.
Passwords are selectively reencrypted to the corresponding keys of their new destination.
๐ git
git git-command-args...
If the password store is a git repository, pass git-command-args as arguments to git(1) using the password store as the git repository. If git-command-args is init, in addition to initializing the git repository, add the current contents of the password store to the repository in an initial commit. If the git config key pass.signcommits is set to true, then all commits will be signed using user.signingkey or the default git signing key. This config key may be turned on using:
pass git config --bool --add pass.signcommits true
๐ help
Show usage message.
๐ version
Show version information.
๐ธ SIMPLE EXAMPLES ๐ธ
Okay bestie, these are the actual real-life moves โ copy them, run them, live your truth. ๐
โจ Initialize password store
zx2c4@laptop ~ $ pass init Jason@zx2c4.com
mkdir: created directory โ/home/zx2c4/.password-storeโ
Password store initialized for Jason@zx2c4.com.
โจ List existing passwords in store
zx2c4@laptop ~ $ pass
Password Store
โโโ Business
โ โโโ some-silly-business-site.com
โ โโโ another-business-site.net
โโโ Email
โ โโโ donenfeld.com
โ โโโ zx2c4.com
โโโ France
โโโ bank
โโโ freebox
โโโ mobilephone
Alternatively, pass ls. Same energy, tiny bit more typing.
โจ Find existing passwords in store that match .com
zx2c4@laptop ~ $ pass find .com
Search Terms: .com
โโโ Business
โ โโโ some-silly-business-site.com
โโโ Email
โโโ donenfeld.com
โโโ zx2c4.com
Alternatively, pass search .com. Literally the same thing, pick your fave ๐ซถ
โจ Show existing password
zx2c4@laptop ~ $ pass Email/zx2c4.com
sup3rh4x3rizmynam3
Yeah it just prints it right there on screen. Bold. Iconic. Your business. ๐ญ
โจ Copy existing password to clipboard
zx2c4@laptop ~ $ pass -c Email/zx2c4.com
Copied Email/jason@zx2c4.com to clipboard. Will clear in 45
seconds.
โจ Add password to store
zx2c4@laptop ~ $ pass insert Business/cheese-whiz-factory
Enter password for Business/cheese-whiz-factory: omg so much
cheese what am i gonna do
โจ Add multiline password to store
zx2c4@laptop ~ $ pass insert -m Business/cheese-whiz-factory
Enter contents of Business/cheese-whiz-factory and press Ctrl+D
when finished:
Hey this is my
awesome
multi
line
passworrrrrrrrd.
^D
โจ Generate new password
zx2c4@laptop ~ $ pass generate Email/jasondonenfeld.com 15
The generated password to Email/jasondonenfeld.com is:
$(-QF&Q=IN2nFBx
โจ Generate new alphanumeric password
zx2c4@laptop ~ $ pass generate -n Email/jasondonenfeld.com 12
The generated password to Email/jasondonenfeld.com is:
YqFsMkBeO6di
โจ Generate new password and copy it to the clipboard
zx2c4@laptop ~ $ pass generate -c Email/jasondonenfeld.com 19
Copied Email/jasondonenfeld.com to clipboard. Will clear in 45
seconds.
โจ Remove password from store
zx2c4@laptop ~ $ pass remove Business/cheese-whiz-factory
rm: remove regular file โ/home/zx2c4/.password-store/Business/cheese-whiz-factory.gpgโ? y
removed โ/home/zx2c4/.password-store/Business/cheese-whiz-factory.gpgโ
๐ฅ EXTENDED GIT EXAMPLE ๐ฅ
So here's the whole glow-up, start to finish: we init a brand-new password store, make a git repo out of it, then mess with passwords and sync them. ๐
Real talk: keep an eye on the arguments to that first call ofpass git pushโ go readgit-push(1)if you want the full lore. No cap.
zx2c4@laptop ~ $ pass init Jason@zx2c4.com
mkdir: created directory โ/home/zx2c4/.password-storeโ
Password store initialized for Jason@zx2c4.com.
zx2c4@laptop ~ $ pass git init
Initialized empty Git repository in /home/zx2c4/.password-store/.git/
[master (root-commit) 998c8fd] Added current contents of password store.
1 file changed, 1 insertion(+)
create mode 100644 .gpg-id
zx2c4@laptop ~ $ pass git remote add origin kexec.com:pass-store
zx2c4@laptop ~ $ pass generate Amazon/amazonemail@email.com 21
mkdir: created directory โ/home/zx2c4/.password-store/Amazonโ
[master 30fdc1e] Added generated password for
Amazon/amazonemail@email.com to store.
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 Amazon/amazonemail@email.com.gpg
The generated password to Amazon/amazonemail@email.com is:
<5m,_BrZY`antNDxKN<0A
zx2c4@laptop ~ $ pass git push -u --all
Counting objects: 4, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (4/4), 921 bytes, done.
Total 4 (delta 0), reused 0 (delta 0)
To kexec.com:pass-store
* [new branch] master -> master
Branch master set up to track remote branch master from origin.
zx2c4@laptop ~ $ pass insert Amazon/otheraccount@email.com
Enter password for Amazon/otheraccount@email.com:
som3r3a11yb1gp4ssw0rd!!88**
[master b9b6746] Added given password for Amazon/otheraccount@email.com
to store.
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 Amazon/otheraccount@email.com.gpg
zx2c4@laptop ~ $ pass rm Amazon/amazonemail@email.com
rm: remove regular file โ/home/zx2c4/.password-store/Amazon/amazonemail@email.com.gpgโ? y
removed โ/home/zx2c4/.password-store/Amazon/amazonemail@email.com.gpgโ
rm 'Amazon/amazonemail@email.com.gpg'
[master 288b379] Removed Amazon/amazonemail@email.com from store.
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 Amazon/amazonemail@email.com.gpg
zx2c4@laptop ~ $ pass git push
Counting objects: 9, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (7/7), 1.25 KiB, done.
Total 7 (delta 0), reused 0 (delta 0)
To kexec.com:pass-store
๐ FILES ๐
The spots on your filesystem that matter, bestie. Know them, love them. ๐
~/.password-storeโ the default password storage directory. Your whole vibe lives here.~/.password-store/.gpg-idโ contains the default gpg key identification used for encryption and decryption. Multiple gpg keys may be specified in this file, one per line. If this file exists in any sub directories, passwords inside those sub directories are encrypted using those keys. This should be set using theinitcommand. (Don't hand-edit it, fr fr โ letinitdo it.)~/.password-store/.extensionsโ the directory containing extension files.
๐ ENVIRONMENT VARIABLES ๐
Set these and the tool bends to your will. ๐
PASSWORD_STORE_DIRโ overrides the default password storage directory.PASSWORD_STORE_KEYโ overrides the default gpg key identification set byinit. Keys must not contain spaces and thus use of the hexadecimal key signature is recommended. Multiple keys may be specified separated by spaces.PASSWORD_STORE_GPG_OPTSโ additional options to be passed to all invocations of GPG.PASSWORD_STORE_X_SELECTIONโ overrides the selection passed toxclip, by defaultclipboard. Seexclip(1)for more info.PASSWORD_STORE_CLIP_TIMEโ specifies the number of seconds to wait before restoring the clipboard, by default45seconds.PASSWORD_STORE_UMASKโ sets the umask of all files modified bypass, by default077.PASSWORD_STORE_GENERATED_LENGTHโ the default password length if the pass-length parameter togenerateis unspecified.PASSWORD_STORE_CHARACTER_SETโ the character set to be used in password generation forgenerate. This value is to be interpreted bytr. Seetr(1)for more info.PASSWORD_STORE_CHARACTER_SET_NO_SYMBOLSโ the character set to be used in no-symbol password generation forgenerate, when--no-symbols,-nis specified. This value is to be interpreted bytr. Seetr(1)for more info.PASSWORD_STORE_ENABLE_EXTENSIONSโ this environment variable must be set to"true"for extensions to be enabled.PASSWORD_STORE_EXTENSIONS_DIRโ the location to look for executable extension files, by defaultPASSWORD_STORE_DIR/.extensions.PASSWORD_STORE_SIGNING_KEYโ if this environment variable is set, then all.gpg-idfiles and non-system extension files must be signed using a detached signature using the GPG key specified by the full 40 character upper-case fingerprint in this variable. If multiple fingerprints are specified, each separated by a whitespace character, then signatures must match at least one. Theinitcommand will keep signatures of.gpg-idfiles up to date.EDITORโ the location of the text editor used byedit.
๐ SEE ALSO ๐
gpg2(1), tr(1), git(1), xclip(1), wl-clipboard(1), qrencode(1).
Go read them, they're the supporting cast and they ate. โญ
โ๏ธ AUTHOR โ๏ธ
pass was written by Jason A. Donenfeld. For updates and more information, a project page is available on the World Wide Web.
๐ COPYING ๐
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 the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
And that's the whole page, bestie!! ๐ฆ๐ This glorious little manual came from ZX2C4, dated 2014 March 18, and it's PASS(1) โ go forth and keep your secrets safe, mwah ๐ซถโจ
๐ฆ where this page comes from
- alpine 3.24: pass-doc 1.7.4-r3 ยท GPL-2.0-or-later
- arch rolling: pass 1.7.4-7 ยท GPL2
- epel 10: pass 1.7.4-18.el10_2 ยท GPL-2.0-or-later
- epel 9: pass 1.7.4-16.el9 ยท GPL-2.0-or-later
- fedora 43: pass 1.7.4-17.fc43 ยท GPL-2.0-or-later
- fedora 44: pass 1.7.4-19.fc44 ยท GPL-2.0-or-later
- nixos 26.05: password-store 1.7.4
- nixpkgs unstable: password-store 1.7.4
- opensuse-leap 16.0: password-store 1.7.4-bp160.1.8 ยท GPL-2.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms