keepassxreboot / keepassxc

KeePassXC is a cross-platform community-driven port of the Windows application “Keepass Password Safe”.
https://keepassxc.org/
Other
21.39k stars 1.48k forks source link

Search Capabilities for `keepassxc-cli` Like In GUI #11431

Closed charlykwr closed 2 weeks ago

charlykwr commented 2 weeks ago

Summary

Unfortunately, it's not possible to search for entries using keepassxc-cli in the same way as in GUI. For example, it would be helpful to search for title, group, username, uuid, and so on with the same capabilities like regular expressions, logical OR, logical NOT, and so on.

Examples

Suppose a database containing the following groups and entries:

/Bank Accounts
/Bank Accounts/Bank_A (username=123456, tag=account)
/Bank Accounts/Bank_A (username=1234 5678 9012 3456, tag=credit_card)
/Bank Accounts/Bank_B (username=567890, tag=account)
/Bank Accounts/Bank_B (username=5678 9012 3456 7890, tag=credit_card)
/Systems
/Systems/host_a (username=root)
/Systems/host_a (username=admin)
/Systems/host_b (username=root)
/Systems/host_b (username=admin)

Using GUI's search capabilities, it's possible to find specific password. Examples:

Search String Found Entry
g:Systems t:host_a u:admin /Systems/host_a (username=admin)
g:"Bank Accounts" t:Bank_B u:"5678 9012 3456 7890 /Bank Accounts/Bank_B (username=5678 9012 3456 7890, tag=credit_card)
g:"Bank Accounts" t:Bank_B tag:credit_card /Bank Accounts/Bank_B (username=5678 9012 3456 7890, tag=credit_card)

Unfortunately, keepassxc-cli doesn't provide such search capabilities.

Context

See above, the example contains the context.

droidmonkey commented 2 weeks ago

Use keepassxc-cli search ...