#password-manager #qrcode #pass #shared #key #encryption #folders

bin+lib passrs

Rust 实现的 Linux pass 程序,带有共享文件夹

4 个版本

0.6.1 2024 年 8 月 1 日
0.6.0 2024 年 7 月 31 日
0.5.4 2021 年 12 月 8 日
0.5.3 2021 年 12 月 8 日

#94身份验证

Download history 280/week @ 2024-07-29 34/week @ 2024-08-05

314 每月下载量

MIT 许可证

82KB
2K SLoC

passrs

zx2c4 的 pass 密码管理器的 Rust 实现。

工作原理

这是为了解决与非技术用户 轻松 共享密码的问题。

它按目录存储 XChaCha20Poly1305 密钥,并在密码文件的第 1 行存储 XNonce,在第 2 行存储加密密码。

passrs 力求尽可能与 pass 兼容,只有少数例外。

使用方法

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.

待办事项

命令

  • 创建保险库(init [子文件夹] [名称]
  • 显示密码([ls] [子文件夹]
  • 查找匹配的名称(find pass-names...
    • 清理打印,以考虑没有进一步匹配的条目
  • 显示密码([show] pass-name
    • 剪贴板支持([--clip,-c]
    • 生成 QRCode([--qrcode,-q]
  • grep 所有明文密码(grep [GREPOPTIONS] search-string
  • 插入密码(insert pass-name
    • 显示密码([--echo,-e]
    • 强制覆盖([--force,-f]
    • 多行支持([--echo,-e | --multiline,-m]
      • 剪切行号( --clip[=line-number],-c[=line-number]
  • 编辑密码( edit pass-name
  • 生成密码( generate,gen
    • 存储中插入( [pass-name]
    • 无特殊字符( [--no-symbols,-n]
    • 剪贴板支持([--clip,-c]
    • 内联支持?( [--in-place,-i]
    • 强制覆盖([--force,-f]
    • 自定义长度( [--length,-l]
  • 删除密码/路径( rm pass-name
    • 递归( [--recursive,-r]
    • 强制覆盖([--force,-f]
  • 移动密码( mv [--force,-f] old-path new-path
  • 复制密码( cp [--force,-f] old-path new-path
  • Git 支持( git git-command-args...
  • 显示帮助( help
  • 显示版本( version
  • 多保险库管理(vault
    • 列出保险库(list
    • 选择默认保险库(set vault-name
    • 重命名保险库(rename old-name new-name
    • 删除保险库(delete vault-name
    • 移动保险库(mv vault-name new-path

重构

  • 更清晰的参数解析
  • 在命令解析错误时更好的使用
  • 单元测试
  • 更智能的配置存储
  • 使用独立的 bin 编译将 passrs 库化

依赖

~6–21MB
~233K SLoC