So, I've been using keepassxc for some time now, but I wanted a viable alternative for command line usage (there is keepassxc-cli, that I use, but it is really a pain in the ass). So, I searched and found pass and gopass.
However, I've seen that they store each entry in a gpg encrypted file, inside a plain directory hierarchy. And, don't get me wrong, I believe that there are use cases for this, but if someone got their hands in your password_store, they would know every single login that you have (the only information that is protected is the password, or whatever is in the gpg file).
So, my question is, there is a password manager, cli based, that encrypts the whole database, and not the single entries?
Update: there is a pass extension made specifically to address this issue
I use Unix pass and KeePassXC before that. When I was switching I shared the concern of the names and structure of my passwords . A couple things convinced me it was fine.
First: It’s an arbitrary folder structure. You can name the folders whatever you want. Same is true for individual files. There is a field you can populate with the url the password is for, and when using browser extensions, or a mobile Unix pass manager, they use this field to check which password to offer, so the name of the encrypted file can be anything and so I often name them seemingly random things.
Second: how I chose to sync them made it kind of a non-issue. Some people literally store their password store folder on GitHub. This freaked me out a bit for the reason you are concerned, people even knowing the names of my files. The solution was to self host a git repo on my home LAN and then using Tailscale sync my devices to it from anywhere. Could also be done with syncthing, but the mobile app I use has git functionality built in. This way none of my files even touch the clear net, so I worry a lot less about people knowing the names of my passwords.
With pass, everything in the store is gpg encrypted. Unless they have your master password, getting the password_store itself will give them nothing but encrypted data blobs.
So even the sub-directories of the password store are encrypted? For example, even if I put my password int the name of a subdirectory, they wouldn't be able to see it?
No, only the file contents are encrypted. The file names and folder structure is visible to anyone who has access to the files.
The files themselves can contain a ton of stuff if you want, but the convention is to put the password on the first line and that's what "pass -c my/file" will copy.
I'm using the Gnome Keyring on my Arch Linux system with Xfce desktop environment, and access its secrets from the command line with secret-tool, but I believe KeepassXC also supports the DBus Secret Service API, so that you can use secret-tool with it also.
but if someone got their hands in your password_store
There's really no way around this. If someone "gets their hands on" your anything you're pretty much fucked. Pass is good enough privacy to justify its usage.
I agree, but picture this: if someone get their hands in a kdbx database, they would need to brute force through the master password; they couldn't possibly know any sites or logins. In the other hand, if someone got your password store, and you used this hierarchy structure, they could try to attack directly the logins, which increases the attack surface. That being said, yes, I completely agree with your last statement.
edit. For example, if you want to host the password database in a host service not owned by yourself, pass is entirely out of question in this case. A kbdx database, however, would offer a good deal of privacy
It depends how you use it. There is no requirement as to how you set up your directory structure, so you could have one file "passwords" with all your credentials in, including the website. That would break a lot of plugin's functionality though.