{"id":13595702,"url":"https://github.com/dylanaraps/pash","last_synced_at":"2025-10-22T06:32:47.480Z","repository":{"id":56365631,"uuid":"172387347","full_name":"dylanaraps/pash","owner":"dylanaraps","description":"🔒 A simple password manager using GPG written in POSIX sh.","archived":true,"fork":false,"pushed_at":"2023-05-23T02:11:53.000Z","size":141,"stargazers_count":341,"open_issues_count":5,"forks_count":23,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-08-01T16:42:39.309Z","etag":null,"topics":["password-generator","password-manager","password-store","password-vault","pasword"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dylanaraps.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-02-24T20:37:19.000Z","updated_at":"2024-07-28T14:45:06.000Z","dependencies_parsed_at":"2024-01-07T21:21:55.659Z","dependency_job_id":"62b4e4bf-1692-480d-8017-d609dc9b3138","html_url":"https://github.com/dylanaraps/pash","commit_stats":{"total_commits":153,"total_committers":4,"mean_commits":38.25,"dds":0.02614379084967322,"last_synced_commit":"6b821ac913b07f23b61b4b8bece6c07bd6d2098a"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dylanaraps%2Fpash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dylanaraps%2Fpash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dylanaraps%2Fpash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dylanaraps%2Fpash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dylanaraps","download_url":"https://codeload.github.com/dylanaraps/pash/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223394706,"owners_count":17138600,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["password-generator","password-manager","password-store","password-vault","pasword"],"created_at":"2024-08-01T16:01:55.934Z","updated_at":"2025-10-22T06:32:42.218Z","avatar_url":"https://github.com/dylanaraps.png","language":"Shell","funding_links":[],"categories":["Shell","\u003ca name=\"password-manager\"\u003e\u003c/a\u003ePassword managers"],"sub_categories":[],"readme":"# pash\n\nA simple password manager using GPG written in POSIX `sh`.\n\n- Written in safe and [shellcheck](https://www.shellcheck.net/) compliant POSIX `sh`.\n- Only `120~` LOC (*minus blank lines and comments*).\n- Compatible with `pass`'s password store.\n- Clears the clipboard after a timeout.\n- Configurable password generation using `/dev/urandom`.\n- Guards against `set -x`, `ps` and `/proc` leakage.\n- Easily extendible through the shell.\n\n## Table of Contents\n\n\u003c!-- vim-markdown-toc GFM --\u003e\n\n* [Dependencies](#dependencies)\n* [Usage](#usage)\n* [FAQ](#faq)\n    * [How does this differ from `pass` or etc?](#how-does-this-differ-from-pass-or-etc)\n    * [Where are passwords stored?](#where-are-passwords-stored)\n    * [How can I use a public key?](#how-can-i-use-a-public-key)\n    * [How do I change the password length?](#how-do-i-change-the-password-length)\n    * [How do I change the password generation pattern?](#how-do-i-change-the-password-generation-pattern)\n    * [How do I change the password store location?](#how-do-i-change-the-password-store-location)\n    * [How do I change the clipboard tool?](#how-do-i-change-the-clipboard-tool)\n    * [How do I change the clipboard timeout?](#how-do-i-change-the-clipboard-timeout)\n    * [How do I rename an entry?](#how-do-i-rename-an-entry)\n    * [How can I migrate from `pass` to `pash`?](#how-can-i-migrate-from-pass-to-pash)\n    * [How can I extend `pash`?](#how-can-i-extend-pash)\n\n\u003c!-- vim-markdown-toc --\u003e\n\n## Dependencies\n\n- `gpg` or `gpg2`\n\n**Clipboard Support**:\n\n- `xclip` (*can be customized through `PASH_CLIP`*).\n\n\n## Usage\n\nExamples: `pash add web/gmail`, `pash list`, `pash del google`, `pash show github`, `pash copy github`.\n\n```\nSYNOPSIS\n\npash [ add|del|show|list|copy ] [name]\n\nCOMMANDS\n\n[a]dd  [name] - Create a new password entry.\n[c]opy [name] - Copy entry to the clipboard.\n[d]el  [name] - Delete a password entry.\n[l]ist        - List all entries.\n[s]how [name] - Show password for an entry.\n[t]ree        - List all entries in a tree.\n\nOPTIONS\n\nUsing a key pair:  export PASH_KEYID=XXXXXXXX\nPassword length:   export PASH_LENGTH=50\nPassword pattern:  export PASH_PATTERN=_A-Z-a-z-0-9\nStore location:    export PASH_DIR=~/.local/share/pash\nClipboard tool:    export PASH_CLIP='xclip -sel c'\nClipboard timeout: export PASH_TIMEOUT=15 ('off' to disable)\n```\n\n## FAQ\n\n### How does this differ from `pass` or etc?\n\nI was looking for a CLI password manager (*written in shell*) and wasn't happy with the options I had found. They either had multiple instances of `eval` (*on user inputted data*), lots of unsafe shell (*nowhere near being `shellcheck` compliant.*) or they were overly complex. The opposites for what I'd want in a password manager.\n\nI decided to write my own. `pash` is written in POSIX `sh` and the codebase is minimal (*120~ LOC minus blank lines and comments*).\n\n### Where are passwords stored?\n\nThe passwords are stored in GPG encrypted files located at `${XDG_DATA_HOME:=$HOME/.local/share}/pash}`.\n\n\n### How can I use a public key?\n\nSet the environment variable `PASH_KEYID` to the ID of the key you'd like to encrypt and decrypt passwords with.\n\nExample:\n\n```sh\n# Default: 'unset'.\nexport PASH_KEYID=XXXXXXXX\n\n# This can also be an email.\nexport PASH_KEYID=dylan.araps@gmail.com\n\n# This can also be used as a one-off.\nPASH_KEYID=XXXXXXXX pash add github\n```\n\n### How do I change the password length?\n\nSet the environment variable `PASH_LENGTH` to a valid integer.\n\nExample:\n\n```sh\n# Default: '50'.\nexport PASH_LENGTH=50\n\n# This can also be used as a one-off.\nPASH_LENGTH=10 pash add github\n```\n\n### How do I change the password generation pattern?\n\nSet the environment variable `PASH_PATTERN` to a valid `tr` string.\n\n```sh\n# Default: '_A-Z-a-z-0-9'.\nexport PASH_PATTERN=_A-Z-a-z-0-9\n\n# This can also be used as a one-off.\nPASH_PATTERN=_A-Z-a-z-0-9 pash add hackernews\n```\n\n\n### How do I change the password store location?\n\nSet the environment variable `PASH_DIR` to a directory.\n\n```sh\n# Default: '~/.local/share/pash'.\nexport PASH_DIR=~/.local/share/pash\n\n# This can also be used as a one-off.\nPASH_DIR=/mnt/drive/pash pash list\n```\n\n### How do I change the clipboard tool?\n\nSet the environment variable `PASH_CLIP` to a command.\n\n**NOTE**: I advise that you disable clipboard history in managers like KDE's `klipper` before copying passwords through `pash`. Your Desktop Environment's clipboard manager may read entries from the X clipboard when `xclip` is used.\n\n**NOTE**: `pash` will correctly clear all clipboards which have history disabled.\n\n```sh\n# Default: 'xclip -sel c'.\nexport PASH_CLIP='xclip -sel c'\n\n# This can also be used as a one-off.\nPASH_CLIP='xclip -sel c' pash copy github\n```\n\n### How do I change the clipboard timeout?\n\nSet the environment variable `PASH_TIMEOUT` to a valid `sleep` interval or `off` to disable the feature.\n\n```sh\n# Default: '15'\nexport PASH_TIMEOUT=15\n\n# Disable timeout.\nexport PASH_TIMEOUT=off\n\n# This can also be used as a one-off.\nPASH_TIMEOUT=5 pash copy github\n```\n\n### How do I rename an entry?\n\nIt's a file! Standard UNIX utilities can be used here.\n\n\n### How can I migrate from `pass` to `pash`?\n\nI cannot guarantee 100% compatibility with the stores from `pass` as `pash` wasn't written as a 1:1 replacement, however users have reported that `pash` does in fact work fine with `pass`' store.\n\nAdd the following to your `.shellrc` or `.profile`.\n\n```\nread -r PASH_KEYID \u003c \"$PASH_DIR/.gpg-id\"\n\nexport PASH_DIR=${PASSWORD_STORE_DIR:-$HOME/.password-store}\nexport PASH_KEYID\n```\n\n### How can I extend `pash`?\n\nA shell function can be used to add new commands and functionality to `pash`. The following example adds `pash git` to execute `git` commands on the password store.\n\n```sh\npash() {\n    case $1 in\n        g*)\n            cd \"${PASH_DIR:=${XDG_DATA_HOME:=$HOME/.local/share}/pash}\"\n            shift\n            git \"$@\"\n        ;;\n\n        *)\n            command pash \"$@\"\n        ;;\n    esac\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdylanaraps%2Fpash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdylanaraps%2Fpash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdylanaraps%2Fpash/lists"}