About pwd.sh
pwd.sh, by drduh, is a Bash script for managing text secrets such as passwords with GnuPG. Each secret is saved to a randomly named file in a directory, and an encrypted index maps usernames to those files. Both the index and the files can be decrypted directly with GnuPG, without needing pwd.sh at all.
Run interactively or with command-line options, the script lets you write, read and list secrets, generate random secrets and usernames, archive materials for backup and print version and help text. Secrets are stored with an epoch timestamp for revision control, and the most recent version is read by default. Environment variables configure the storage directory, index name, clipboard command and arguments, the output destination and how many seconds the secret stays in the clipboard or on screen before being cleared, which defaults to ten seconds.
The tool is written in Shell, licensed under MIT, and works on Linux and macOS with clipboard tools such as xclip or pbcopy. It runs locally with no server, so there is no hosted service.
Key features
- GnuPG symmetric encryption of secrets
- Randomly named secret files
- Encrypted index of usernames
- Random password and username generation
- Clipboard clearing after a timeout
- Backup and restore with tar archives
Good fit for
- →Minimal command-line password storage
- →Auditable secret storage without a database
- Built with
- Shell
- Tags
- password-manager
- gnupg
- bash
- encryption
- secrets
- cli
- security
pwd.sh: questions and answers
- What is pwd.sh used for?
- pwd.sh is a Bash script that manages passwords and other text secrets using GnuPG symmetric encryption and randomly named files. It is a good fit for minimal command-line password storage and auditable secret storage without a database.
- Is pwd.sh open source?
- Yes. pwd.sh is open source under the MIT licence. Its source code is on GitHub at drduh/pwd.sh and is written mainly in Shell.
- Is pwd.sh free?
- Yes. pwd.sh is open source, so the software itself is free to use.
- What are some alternatives to pwd.sh?
- Similar open-source tools in the Password Management category include Purse, Gopass and pass-import. SaaS products in the same category include Bitdefender SecurePass, Codebook and 1Password.
- Is pwd.sh actively maintained?
- Yes. The most recent commit to pwd.sh was on 24 August 2026, and the latest release is v4, published on 24 August 2026. The project has 1.6k stars on GitHub.
Open-source alternatives to pwd.sh
See allPurse
Password Management
Manage secrets with Bash and GnuPG asymmetric encryption (YubiKey)
MIT★ 615
Gopass
Password Management
The slightly more awesome standard unix password manager for teams
MITvs Keeper★ 7.2kpass-import
Password Management
A pass extension for importing data from most existing password managers
GPL-3.0★ 917
KeePassXC
Password Management
KeePassXC is a cross-platform community-driven port of the Windows application “KeePass Pa
OSSvs Dashlane★ 29k
Passbolt
Password Management
Passbolt Community Edition (CE) API. The JSON API for the open source password manager for
AGPL-3.0vs Keeper★ 6.1k
LessPass
Password Management
:key: stateless open source password manager
GPL-3.0vs Dashlane★ 6.1k
SaaS alternatives to pwd.sh
See all
Bitdefender SecurePass
Password Management
Password manager from Bitdefender with passkey support and a digital wallet
SaaS
Codebook
Password Management
Secure password and data vault for Apple and Android devices by Zetetic
SaaS
1Password
Password Management
Password manager for individuals, families and teams with shared vaults and passkeys
SaaS
Avira Password Manager
Password Management
Password manager from Avira with a free version and paid Pro features
SaaS
Dashlane
Password Management
Password manager with autofill, passkey support, dark web monitoring and a built-in VPN
SaaS
Delinea Secret Server
Password Management
Privileged access and credential vault for storing and rotating enterprise secrets
SaaS
