KeePassXC runner
Project description
keepassxc-run
Pass secrets in KeePassXC databases as environment variables to an application or script. This project is inspired by op run command.
usage: keepassxc-run.py [options] -- [command ...]
positional arguments:
command command to execute. prepend "--" if you specify command option like "--version"
options:
--help show this help message
--debug Enable debug log
--env-file ENV_FILE Enable Dotenv integration with specific Dotenv files to parse. For example: --env-file=.env
Usage
keepassxc-run scans environment variables for secret references, loads the corresponding secrets from KeePassXC databases, then runs the provided command in a subprocess with the secrets made available as environment variables for the duration of the subprocess.
If the same environment variable name exists in both the shell and the environment file, the environment file takes precedence. If the same environment variable name exists in multiple environment files, the last environment file takes precedence.
Examples
Suppose the KeePassXC database contains an entry like a image below.
export TEST_PASSWORD="keepassxc://example.com/password"
$ keepassxc-run -- printenv TEST_PASSWORD
testuser*p@ssw0rd
You can fetch additional attributes which start KPH: like below.
$ export TEST_PASSWORD="keepassxc://example.com/api_key"
$ keepassxc-run -- printenv TEST_PASSWORD
my*api*key
Specify an environment file and use it:
echo "TEST_PASSWORD=keepassxc://example.com/password" > .env
$ keepassxc-run --env-file .env -- printenv TEST_PASSWORD
testuser*p@ssw0rd
License
MIT License. See LICENSE for details.
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_run-0.0.3.tar.gz.
File metadata
- Download URL: keepassxc_run-0.0.3.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
366316fc59c39ddd192ee331f5db30878179b9801c44af7ca3d23580596eb79a
|
|
| MD5 |
3592b405c6b5e4555543f26ff681acbb
|
|
| BLAKE2b-256 |
edaf341c9fa2165c370f20db6d7453f9bfec00b55722a154c74fe3aaba2dbe23
|
Provenance
The following attestation bundles were made for keepassxc_run-0.0.3.tar.gz:
Publisher:
release.yml on kai2nenobu/keepassxc-run
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
keepassxc_run-0.0.3.tar.gz -
Subject digest:
366316fc59c39ddd192ee331f5db30878179b9801c44af7ca3d23580596eb79a - Sigstore transparency entry: 153817877
- Sigstore integration time:
-
Permalink:
kai2nenobu/keepassxc-run@e3e30577a68472e06617617cded4a7acf24829c1 -
Branch / Tag:
refs/tags/v0.0.3 - Owner: https://github.com/kai2nenobu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e3e30577a68472e06617617cded4a7acf24829c1 -
Trigger Event:
release
-
Statement type:
File details
Details for the file keepassxc_run-0.0.3-py3-none-any.whl.
File metadata
- Download URL: keepassxc_run-0.0.3-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
59d0b97ee3c36d14ae78809909dddd8dab3969b203c714d24cef91841941d9d2
|
|
| MD5 |
cca54a1eea32f58672ae2604c971b306
|
|
| BLAKE2b-256 |
7f0e339de3cc61cf0c6f28d729c34f34d8ab23e03133b39b76ea02cdf1f22038
|
Provenance
The following attestation bundles were made for keepassxc_run-0.0.3-py3-none-any.whl:
Publisher:
release.yml on kai2nenobu/keepassxc-run
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
keepassxc_run-0.0.3-py3-none-any.whl -
Subject digest:
59d0b97ee3c36d14ae78809909dddd8dab3969b203c714d24cef91841941d9d2 - Sigstore transparency entry: 153817880
- Sigstore integration time:
-
Permalink:
kai2nenobu/keepassxc-run@e3e30577a68472e06617617cded4a7acf24829c1 -
Branch / Tag:
refs/tags/v0.0.3 - Owner: https://github.com/kai2nenobu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e3e30577a68472e06617617cded4a7acf24829c1 -
Trigger Event:
release
-
Statement type: