CLI integration for KeepassXC GUI.
Project description
keepassxc-cli-integration
CLI and Python integration for KeepassXC GUI.
CLI
- kpx
- base_settings:
- --debug (Debug mode)
- --env {{env}} (Env in format KEY=value. Can multiple entries. Supports KPX queries.)
- commands:
- get
- login
- {{url}} (Get login for the specified URL from open databases.)
- password
- {{url}} (Get password for the specified URL from open databases.)
- --name (Specify the name of the entry in the database. Required if the URL has multiple entries.)
- --bat (Escape output to use BAT.)
- login
- associate
- add (Default. Create an association with the CURRENT ACTIVE database.)
- delete
- {{select}} (Default: "current". Delete the selected association. You can specify the association name as either "all" or "current".)
- show (Show all saved associations.)
- run
- {{command}} (Run another program with query from KeePassXC.)
- get
- base_settings:
Python
The keepassxc_cli_integration.kpx module provides similar functions for use directly in Python.
Notes:
- KeepassXC-GUI !!!MUST!!! have browser integration enabled.
- The association is carried out only with the active (and not with all open) databases. In order to receive information from all open databases, you must first carry out an association with each of them.
- Intended for Windows. May or may not work on Linux.
- Due to limitations of KeepassXC-GUI, it is possible to retrieve records from databases only by URL. The URL field can be written in the database without http(s):\ and can also be specified without http(s):\ in CLI\Python to retrieve data.
Installation
- pip / pipx
pip (or pipx) install keepassxc-cli-integration
- git
git clone https://github.com/overgodofchaos/keepassxc_cli_integration.git
cd keepassxc-cli-integration
pip (or pipx) install .
Examples
The query in kpx run has the following format:
@kpx::{{url}}::{{login or password}}::{{name(optional)}}@kpx
kpx run poetry publish --build --username=__token__ --password=@kpx::pypi.org::password::pypi_token@kpx
This is mostly for CMD, as there is no convenient way to get the result from third-party functions.
Can be used in scripts:
example.ps1
$VeraCrypt = "C:\Program Files\VeraCrypt\VeraCrypt.exe"
$password = kpx get passoword example-vault
& $VeraCrypt /volume "C:\example\vault.hc" /letter Y /password $password /b /q
example2.ps1
$VeraCrypt = "C:\Program Files\VeraCrypt\VeraCrypt.exe"
kpx run $VeraCrypt /volume "C:\example\vault.hc" /letter Y /password $(kpx get passoword example-vault) /b /q
exemple3.bat
set VeraCrypt="C:\Program Files\VeraCrypt\VeraCrypt.exe"
VeraCrypt /volume "C:\example\vault.hc" /letter Y /password '@kpx::example-vault::password@kpx' /b /q
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file keepassxc_cli_integration-1.4.0.tar.gz.
File metadata
- Download URL: keepassxc_cli_integration-1.4.0.tar.gz
- Upload date:
- Size: 15.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.4 CPython/3.13.7 Windows/11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6efb09639e7e6f34f72e89d0c1c8cc296ce0dd7a3889157b2372153637974e68
|
|
| MD5 |
428df5d6188515b5a8b5e07ecd851d22
|
|
| BLAKE2b-256 |
054d7399e7bc8ec3eaeca661f712320d3fbf4401c3049fa0bbddeb2b5cb66f7b
|
File details
Details for the file keepassxc_cli_integration-1.4.0-py3-none-any.whl.
File metadata
- Download URL: keepassxc_cli_integration-1.4.0-py3-none-any.whl
- Upload date:
- Size: 25.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.4 CPython/3.13.7 Windows/11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a6a9b73cba0053380e67b13c84639480d2e72639cfd88ef81036d51062f9f3d7
|
|
| MD5 |
651f17789c2e5f9fa3dfd7852d40bd39
|
|
| BLAKE2b-256 |
8aee621dde82d5e719c9ead3f72d37f126a22ad3d2838dbd687af67dfcf8be51
|