#password-manager #qr #command-line #shared

bin+lib passrs

Rust implementation of the Linux pass program, with shared folders

6 releases

0.6.3 Sep 30, 2024
0.6.2 Sep 30, 2024
0.6.1 Aug 1, 2024
0.6.0 Jul 31, 2024
0.5.4 Dec 8, 2021

#119 in Authentication

Download history 271/week @ 2024-07-28 42/week @ 2024-08-04 1/week @ 2024-08-11 39/week @ 2024-08-25 15/week @ 2024-09-01 27/week @ 2024-09-15 17/week @ 2024-09-22 306/week @ 2024-09-29 18/week @ 2024-10-06 1/week @ 2024-10-13

342 downloads per month

MIT license

84KB
2K SLoC

passrs

A Rust implementation of zx2c4's pass password manager.

How it works

This is written to solve the issue of easy sharing of passwords with non-technical users.

It stores XChaCha20Poly1305 keys per directory, and stores the XNonce on line 1 of the password file, and the encrypted password on line 2.

passrs aims to be as close to compatible with pass, with few exceptions.

Usage

passrs init [subfolder]
    Initialize a new password vault with a new key.
passrs [ls] [subfolder]
    List passwords.
passrs find pass-names...
    List passwords that match pass-names.
passrs [show] [--qrcode,-q] [--clip,-c] pass-name
    Show existing password. Optionally, show password as a QR code.
    Optionally, copy password to clipboard.
passrs grep [GREPOPTIONS] search-string
    Search for password files containing search-string when decrypted.
passrs insert [--echo,-e] [--force,-f] pass-name
    Insert new password. Optionally, echo the password back to the console
    during entry. Prompt before overwriting existing password unless forced.
passrs edit pass-name [--echo,-e]
    Insert a new password or edit an existing password.
passrs generate [--echo,-e] [--no-symbols,-n] [--force,-f] pass-name [pass-length]
    Generate a new password of pass-length (or 32 if unspecified) with optionally no symbols.
    Prompt before overwriting existing password unless forced.
    Optionally, echo the password back to the console.
passrs rm [--recursive,-r] [--force,-f] pass-name
    Remove existing password or directory, optionally forcefully
passrs mv [--force,-f] old-path new-path
    Renames or moves old-path to new-path, optionally forcefully, re-encrypting as it goes.
passrs cp [--force,-f] old-path new-path
    Copies old-path to new-path, optionally forcefully, re-encrypting as it goes.
passrs git git-command-args...
    If the password store is a git repository, execute a git command
    specified by git-command-args.
passrs help
    Show this help text.
passrs version
    Show version information.

TODO

Commands

  • Create vault ( init [subfolder] [name] )
  • Show passwords ( [ls] [subfolder] )
  • Find matching names ( find pass-names... )
    • Cleanup printing to account for no further entries that match
  • Show password ( [show] pass-name )
    • Clipboard support ( [--clip,-c] )
    • QRCode generation ( [--qrcode,-q] )
  • Grep all plaintext passwords ( grep [GREPOPTIONS] search-string )
  • Insert password ( insert pass-name )
    • Show password ( [--echo,-e] )
    • Force overwrite ( [--force,-f] )
    • Multiline support ( [--echo,-e | --multiline,-m] )
      • Clip line numbers ( --clip[=line-number],-c[=line-number] )
  • Edit password ( edit pass-name )
  • Generate password ( generate,gen )
    • Insert into storage ( [pass-name] )
    • No special characters ( [--no-symbols,-n] )
    • Clipboard support ( [--clip,-c] )
    • Inline support? ( [--in-place,-i] )
    • Force overwrite ( [--force,-f] )
    • Custom length ( [--length,-l] )
  • Delete password/path ( rm pass-name )
    • Recursive ( [--recursive,-r] )
    • Force overwrite ( [--force,-f] )
  • Move password ( mv [--force,-f] old-path new-path )
  • Copy password ( cp [--force,-f] old-path new-path )
  • Git support ( git git-command-args... )
  • Show help ( help )
  • Show version ( version )
  • Multi-vault management (vault)
    • List vaults (list)
    • Select default vault (set vault-name)
    • Rename vaults (rename old-name new-name)
    • Delete vaults (delete vault-name)
    • Move vaults (mv vault-name new-path)

Refactoring

  • Cleaner argument parsing
  • Better usage on command parse error
  • Unit tests
  • Smarter configuration storage
  • Libify passrs with separate bin compilation

Dependencies

~5–18MB
~238K SLoC