Codex skill for reading credentials from a local KeePass database through the KeePassHTTP plugin while minimizing exposure of secret values.
This project is designed for local use. It does not ship with credentials, database files, KeePass configuration, or machine-specific association state.
- Creates a one-time KeePassHTTP client association for the current machine and user profile.
- Stores only the KeePassHTTP client id and AES key in a local state file.
- Reuses that association for later read-only lookups.
- Reads narrow fields such as
login,password,title,uuid, orcount. - Defaults to
countoutput so accidental invocations do not dump decrypted entries.
- Python 3.11 or newer.
- Poetry.
- KeePass with the KeePassHTTP plugin enabled.
- An unlocked KeePass database, or permission for KeePassHTTP to trigger an unlock prompt.
make installmake install installs Python dependencies and starts the one-time association flow. Approve the new client in KeePass when prompted.
The association is stored at:
~/.config/keepasshttp-secrets/client.json
That file is machine-local secret material. Do not commit or publish it.
Create or refresh the association:
make associateForce a new association:
make reauthorizeCount matching entries:
poetry run python scripts/read_secret.py https://example.comRead the first matching login:
poetry run python scripts/read_secret.py https://example.com --field login --firstRead the first matching password only when explicitly needed:
poetry run python scripts/read_secret.py https://example.com --field password --firstInspect full decrypted matching entries only when necessary:
poetry run python scripts/read_secret.py https://example.com --field jsonThe default KeePassHTTP endpoint is:
http://localhost:19455
Override it per command:
poetry run python scripts/read_secret.py https://example.com --endpoint http://localhost:19455Or via environment:
KEEPASSHTTP_ENDPOINT=http://localhost:19455 poetry run python scripts/read_secret.py https://example.comUse a separate client state file:
poetry run python scripts/read_secret.py https://example.com --client-file ./client.jsonOr via environment:
KEEPASSHTTP_CLIENT_FILE=./client.json poetry run python scripts/read_secret.py https://example.com- Never publish
client.json, KeePass databases, exported credentials, logs containing decrypted values, or screenshots with secrets. - Prefer
--field count,--field login,--field title, or--field uuidbefore using--field password. - Use
--field jsononly for deliberate debugging or inspection. - Do not paste decrypted payloads into issue trackers, pull requests, chat, or logs.
make testThe test target validates project metadata, compiles the helper, runs unit tests, and checks CLI help without contacting KeePassHTTP.
BSD 3-Clause License. See LICENSE.
- Run
make test. - Confirm
git status --shortdoes not include__pycache__,*.pyc,client.json, or other local state. - Confirm the BSD 3-Clause license text and copyright holder are correct.