kpsh


Namekpsh JSON
Version 2.2.0 PyPI version JSON
download
home_pagehttps://git.goral.net.pl/mgoral/keepass-shell
SummaryKeePass shell interface and daemon
upload_time2024-02-12 22:58:46
maintainer
docs_urlNone
authorMichal Goral
requires_python>=3.8,<4.0
licenseGPL-3.0-or-later
keywords keepass shell password cli tui
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # kpsh

kpsh, or KeePass Shell, is a password manager and an interactive shell for
working directly with KeePass password database files.

## Features

- create, open, lock and unlock databases
- add, edit and delete database entries
- list contents of database
- show contents of database entries and filter them by fields
- autotype usernames and passwords or any sequences of entry fields (by
  xdotool on X11 and ydotool on Wayland)
- access all commands non-interactively via `-c` switch or by piping commands
  directly to kpsh
- tab-completion in interactive mode
- daemon mode: open and unlock your database once and then quickly access
  its contents from kpsh-client.
- several built-in ways to obtain a password, which can be passed by argument,
  typed directly to kpsh or through pinentry program program or fetched from a
  provided command output
- ships with highly customizable kpsh-menu script which performs any kpsh
  command on entries selected by dmenu/rofi/fzf (e.g. autotype passwords
  selected in dmenu/rofi)

## Online Documentation

<https://pages.goral.net.pl/keepass-shell>

## Usage examples

Typical session:

```
$ kpsh passwords.kdbx

passwords.kdbx> ls
Password: ********
personal/bank
personal/login
personal/website
work/login

passwords.kdbx> show work/login
path: work/login
username: John Doe
password: jsdf7y8h8349yhj3h42
notes[1]: this is my work password
notes[2]: it's the best
```

Get a password from gpg-encrypted file (trailing newline, which isn't a part
of password is trimmed):

```
$ gpg --encrypt -o masterpass.gpg -r mymail@example.com
<type type type>
^D
$ kpsh passwords.kdbx --password-command "gpg --decrypt masterpass.gpg | tr -d '\n'"
```

... or from a keyring:

```
$ secret-tool store --label='keepass' database passwords.kdbx
$ kpsh passwords.kdbx --password-command "secret-tool lookup database passwords.kdbx"
```

Autotype a user/password sequence:

```
$ kpsh passwords.kdbx --password-command "secret-tool lookup database passwords.kdbx"
                      -c autotype entry1
```

... or just a password, but a little faster:

```
$ kpsh passwords.kdbx --password-command "secret-tool lookup database passwords.kdbx"
                      -c "autotype -s {PASSWORD} -D 12 entry1"
```

Run as daemon (`-d`):

```
$ kpsh passwords.kdbx -d --password-command "secret-tool lookup database passwords.kdbx" &
$ kpsh-client ls
entry1
entry2
$ kpsh-client autotype entry1
```

Use pinentry to get a password to unlock database:

```
$ kpsh passwords.kdbx --pinentry /usr/bin/pinentry
```

## Installation

Use [pipx][pipx]:

```
$ pipx install kpsh
```

Or directly pip:

```
$ pip install --user kpsh
```

Install fetched git repository (for example to test yet unreleased code):

```
$ cd keepass-shell
$ rm -rf dist
$ pipx install poetry>=1.2.0a
$ poetry build
$ pipx install dist/kpsh-*.whl
```

### Test kpsh without installation (e.g. for development purposes)

One time setup:

```
$ pipx install poetry>=1.2.0a
$ poetry lock
$ poetry install
```

The last command installs kpsh in _editable_ mode, meaning that it will
automatically reflect changes in source code. You can safely use it to change
kpsh to your liking.

Once kpsh is installed in poetry-managed virtualenv, you can run it like
this:

```
$ poetry run kpsh
```

  [pipx]: https://github.com/pypa/pipx

            

Raw data

            {
    "_id": null,
    "home_page": "https://git.goral.net.pl/mgoral/keepass-shell",
    "name": "kpsh",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8,<4.0",
    "maintainer_email": "",
    "keywords": "keepass,shell,password,cli,tui",
    "author": "Michal Goral",
    "author_email": "dev@goral.net.pl",
    "download_url": "https://files.pythonhosted.org/packages/94/47/708621ffb1fb92bddacb2ebd2798b6401e3cc73126e9b799c4ce26e4d4d3/kpsh-2.2.0.tar.gz",
    "platform": null,
    "description": "# kpsh\n\nkpsh, or KeePass Shell, is a password manager and an interactive shell for\nworking directly with KeePass password database files.\n\n## Features\n\n- create, open, lock and unlock databases\n- add, edit and delete database entries\n- list contents of database\n- show contents of database entries and filter them by fields\n- autotype usernames and passwords or any sequences of entry fields (by\n  xdotool on X11 and ydotool on Wayland)\n- access all commands non-interactively via `-c` switch or by piping commands\n  directly to kpsh\n- tab-completion in interactive mode\n- daemon mode: open and unlock your database once and then quickly access\n  its contents from kpsh-client.\n- several built-in ways to obtain a password, which can be passed by argument,\n  typed directly to kpsh or through pinentry program program or fetched from a\n  provided command output\n- ships with highly customizable kpsh-menu script which performs any kpsh\n  command on entries selected by dmenu/rofi/fzf (e.g. autotype passwords\n  selected in dmenu/rofi)\n\n## Online Documentation\n\n<https://pages.goral.net.pl/keepass-shell>\n\n## Usage examples\n\nTypical session:\n\n```\n$ kpsh passwords.kdbx\n\npasswords.kdbx> ls\nPassword: ********\npersonal/bank\npersonal/login\npersonal/website\nwork/login\n\npasswords.kdbx> show work/login\npath: work/login\nusername: John Doe\npassword: jsdf7y8h8349yhj3h42\nnotes[1]: this is my work password\nnotes[2]: it's the best\n```\n\nGet a password from gpg-encrypted file (trailing newline, which isn't a part\nof password is trimmed):\n\n```\n$ gpg --encrypt -o masterpass.gpg -r mymail@example.com\n<type type type>\n^D\n$ kpsh passwords.kdbx --password-command \"gpg --decrypt masterpass.gpg | tr -d '\\n'\"\n```\n\n... or from a keyring:\n\n```\n$ secret-tool store --label='keepass' database passwords.kdbx\n$ kpsh passwords.kdbx --password-command \"secret-tool lookup database passwords.kdbx\"\n```\n\nAutotype a user/password sequence:\n\n```\n$ kpsh passwords.kdbx --password-command \"secret-tool lookup database passwords.kdbx\"\n                      -c autotype entry1\n```\n\n... or just a password, but a little faster:\n\n```\n$ kpsh passwords.kdbx --password-command \"secret-tool lookup database passwords.kdbx\"\n                      -c \"autotype -s {PASSWORD} -D 12 entry1\"\n```\n\nRun as daemon (`-d`):\n\n```\n$ kpsh passwords.kdbx -d --password-command \"secret-tool lookup database passwords.kdbx\" &\n$ kpsh-client ls\nentry1\nentry2\n$ kpsh-client autotype entry1\n```\n\nUse pinentry to get a password to unlock database:\n\n```\n$ kpsh passwords.kdbx --pinentry /usr/bin/pinentry\n```\n\n## Installation\n\nUse [pipx][pipx]:\n\n```\n$ pipx install kpsh\n```\n\nOr directly pip:\n\n```\n$ pip install --user kpsh\n```\n\nInstall fetched git repository (for example to test yet unreleased code):\n\n```\n$ cd keepass-shell\n$ rm -rf dist\n$ pipx install poetry>=1.2.0a\n$ poetry build\n$ pipx install dist/kpsh-*.whl\n```\n\n### Test kpsh without installation (e.g. for development purposes)\n\nOne time setup:\n\n```\n$ pipx install poetry>=1.2.0a\n$ poetry lock\n$ poetry install\n```\n\nThe last command installs kpsh in _editable_ mode, meaning that it will\nautomatically reflect changes in source code. You can safely use it to change\nkpsh to your liking.\n\nOnce kpsh is installed in poetry-managed virtualenv, you can run it like\nthis:\n\n```\n$ poetry run kpsh\n```\n\n  [pipx]: https://github.com/pypa/pipx\n",
    "bugtrack_url": null,
    "license": "GPL-3.0-or-later",
    "summary": "KeePass shell interface and daemon",
    "version": "2.2.0",
    "project_urls": {
        "Documentation": "https://git.goral.net.pl/mgoral/keepass-shell/src/branch/master/docs",
        "Homepage": "https://git.goral.net.pl/mgoral/keepass-shell",
        "Repository": "https://git.goral.net.pl/mgoral/keepass-shell"
    },
    "split_keywords": [
        "keepass",
        "shell",
        "password",
        "cli",
        "tui"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6c9516e9b6a0507a8c2c760494d86b3472e7ede5ac163c4fc156694282c7c320",
                "md5": "c00e3c610f0bffa700b7f1bb277b3a7d",
                "sha256": "e32b3959df425753a30266aaa901cc8965af84135eee98e0f2d8bb86cef36bfa"
            },
            "downloads": -1,
            "filename": "kpsh-2.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c00e3c610f0bffa700b7f1bb277b3a7d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<4.0",
            "size": 45387,
            "upload_time": "2024-02-12T22:58:44",
            "upload_time_iso_8601": "2024-02-12T22:58:44.613106Z",
            "url": "https://files.pythonhosted.org/packages/6c/95/16e9b6a0507a8c2c760494d86b3472e7ede5ac163c4fc156694282c7c320/kpsh-2.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9447708621ffb1fb92bddacb2ebd2798b6401e3cc73126e9b799c4ce26e4d4d3",
                "md5": "a18a8a1f00507a0760134cefedf1a7fc",
                "sha256": "b1b78e0284f42934394647b42b45a413883d8c65bc3d5cbf53b896f5874c8792"
            },
            "downloads": -1,
            "filename": "kpsh-2.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "a18a8a1f00507a0760134cefedf1a7fc",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<4.0",
            "size": 62672,
            "upload_time": "2024-02-12T22:58:46",
            "upload_time_iso_8601": "2024-02-12T22:58:46.356818Z",
            "url": "https://files.pythonhosted.org/packages/94/47/708621ffb1fb92bddacb2ebd2798b6401e3cc73126e9b799c4ce26e4d4d3/kpsh-2.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-12 22:58:46",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "kpsh"
}
        
Elapsed time: 0.38022s