$ git clone -q https://github.com/biox/pa.git
$ cd pa/contrib
$ ls -1 -p
pa-bemenu
pa-completion.bash
pa-completion.fish
pa-dmenu
pa-fuzzel
pa-pass
pa-rekey
pa-rofi
pa-ssg
pa-urn
pa-wmenu
$ nl -b a -s ' ' -w 3 pa-pass
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
#!/bin/sh
#
# migrate passwords from pass to pa
#
# password dir of pass: export PASSWORD_STORE_DIR=~/.password-store
# password dir of pa:   export PA_DIR=~/.local/share/pa/passwords

: "${PASSWORD_STORE_DIR:=$HOME/.password-store}"
: "${PA_DIR:=${XDG_DATA_HOME:-$HOME/.local/share}/pa}"

# Create pa store if it doesn't exist.
pa l >/dev/null || exit

age=$(command -v age || command -v rage)

find "$PASSWORD_STORE_DIR" -name '*.gpg' | while read -r passfile; do
    name=$(printf %s "${passfile#"$PASSWORD_STORE_DIR/"}" | sed 's/\.gpg$//')
    mkdir -p "$PA_DIR/passwords/$(dirname "./$name")"
    gpg2 -d "$passfile" |
        $age -R "$PA_DIR/recipients" -o "$PA_DIR/passwords/$name.age" &&
        printf '%s\n' "saved '$name' to the store."
done

if [ -z "${PA_NOGIT+x}" ] && command -v git >/dev/null 2>&1; then
    git -C "$PA_DIR/passwords" add .
    git -C "$PA_DIR/passwords" commit -m "migrate from pass"
fi