Skip to main content
# Keefind

## What it is

Keefind is a simple utility to search in keepass database. I wrote it to be
able to easy search for password and copy it to clipboard.

## Installation

Just install latest version from PyPi:

```
> pip install keefind
```

## Usage

To use keefind you need to export couple environment variables:

```
> export KP_DATABASE=/path/to/keepass/database
> export KP_PASSWORD_FILE=/path/to/file/with/password/to/database
```

Latter variable is a path to file which has to have one line with password
to according keepass database.

After that you can just start to use keefind.

## Examples

If you need just get a password and more or less remember the structure of
your database, you can search for exact variable. Let's say you have group
named 'Personal' which consist of groups 'Sites' and 'Banking'. Group 'Sites'
has entry named 'github.com' in it with user 'xxx' and password 'yyy'. To get
the password you can call any of next commands

```
> kf pers gith
yyy

> kf sit xxx
yyy

> kf pers sit github.com xxx
yyy

> kf pers yy
yyy

> kf xxx
yyy
```

So basically under the hood keefind will get all arguments you passed to
it and will try to find an entry which has all of these arguments in path,
name, site, username or password fields. So in case you pass 'xxx' as an
argument, it will show you all found results which have 'xxx' in them. If
you will pass 'xxx zzz', it will show you all found results which have
**both** xxx **and*** zzz in them.

There is just one available option you can use - '-v' to get more verbose
output. Here is how to use it:

```
> kf -v xxx
Personal/Sites - github.com
yyy

> kf -v xxx | xsel -b -i
Personal/Sites - github.com

> # Now your password for github is copied to clipboard. That's the trick,
> # cause in case of single '-v' option passwords copied to stdout but all
> # other info - to stderr, which allows you to pipe output with password(s)

> kf -vv xxx
{'group': 'Personal/Sites',
'password': 'yyy',
'username': 'xxx'}

> kf -vvv xxx
{'group': 'Personal/Sites',
'password': 'yyy',
'title': 'github.com',
'url': None,
'username': 'xxx'}
```

That's mostly it, nothing more. Improvements and bugfixes are welcomed.

## Author

Stanislaw Bogatkin (https://sbog.ru).

Metadata

Release files for keefind 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for keefind 0.1.0
File Size Uploaded
keefind-0.1.0.tar.gz 4.8 kB Details

Release files / keefind-0.1.0.tar.gz

Download URL keefind-0.1.0.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e346d0dd3d236e20937218dad7bf04c8da1c0833ddb8aa9de38a5ece2fbb56b3
BLAKE2b-256 checksum
How to use checksums
209b3a9923e561581aa9a71cec1d6213a443534f23ec9fda79c6e3ee05291d0a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/28.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.0

Release history Release notifications | RSS feed

This release

0.1.0 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page