Skip to main content

Utility to easy find in keepass database

Project description

# 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).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

keefind-0.1.0.tar.gz (4.8 kB view details)

Uploaded Source

File details

Details for the file keefind-0.1.0.tar.gz.

File metadata

  • Download URL: keefind-0.1.0.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for keefind-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e346d0dd3d236e20937218dad7bf04c8da1c0833ddb8aa9de38a5ece2fbb56b3
MD5 37675ecbee0a5e7c8b4431ac6dcae03f
BLAKE2b-256 209b3a9923e561581aa9a71cec1d6213a443534f23ec9fda79c6e3ee05291d0a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page