Skip to main content

cprima-pdh

Practical Digital Housekeeping. Keep your digital life in order, starting with your password database. Keep it tidy. Keep it trustworthy.

pdh is the companion tool of the methodology: it checks a KeePass vault (.kdbx) against a written taxonomy of record types and field names, and changes the vault only on request, as a dry run first. Website: https://pdh.cprima.net

uvx --from "cprima-pdh[kdbx]" pdh doctor --db vault.kdbx

Always use --from: plain uvx pdh runs an unrelated tool of the same command name. The [kdbx] extra installs pykeepass; the method commands (pdh method ...) work without it.

Commands

Group Commands
pdh doctor overview in three sections: setup, file (format and key derivation from the header, lock files, sync conflicts, size drivers) and method (owners, areas, record types, vocabulary, conformance, hygiene, relations)
pdh session unlock, lock, status: cache the master password for a while (Windows DPAPI)
pdh inspect inventory, tree, entries (--expired, --expiring DAYS), tags, totp, find (--in-fields), show, read, links, unclassified, fields, history, attachments, otp (the current code, never the secret)
pdh check conform (the default), validate: findings with levels ERROR / WARN / INFO and, per issue, an action; known-passwords and breaches (online, only with --online)
pdh edit set, link, rename-field (one entry or --all), vocabulary, new-entry, new-group, move, delete (to the recycle bin), restore, purge (only from the bin), clone, tags, expiry, icon, color, override-url, autotype, history-restore, history-prune, attach, detach, rename-group, move-group, delete-group, group-notes, group-icon: dry run unless --apply; every edit keeps the previous state in the entry's history
pdh db create, password, keyfile, settings, kdf, empty-bin: the database itself (dry run unless --apply; new passwords from an environment variable or a hidden prompt)
pdh io import-csv, import-kdbx, merge (by UUID and modification time, nothing deleted), export-csv, export-kdbx, export-attachment: the exports are the only writes outside the vault, only to --out, never over an existing file
pdh generate a password or passphrase from the system's secure random source; printed, never stored
pdh method show, schemas: the taxonomy, no vault needed
pdh backends installed backends

Every vault function a GUI client offers is a command; what pdh does not do is auto-type, browser integration and the graphical UI itself. KDBX 3 to 4 conversion is not offered (pykeepass cannot convert).

Online checks never run without --online. check known-passwords sends only the first 5 characters of each SHA-1 (k-anonymity); check breaches downloads the public breach catalogue and compares it with your URLs locally; --accounts (an API key in HIBP_API_KEY) is the one option that sends e-mail addresses. Level and advice of each finding come from the profile (known-password, breach:*); --fail-on LEVEL sets the exit code like check validate.

What only a human with the real clients can verify is listed in docs/manual-e2e.md.

Use -f json for machine-readable output.

Which vault

--db PATH, else --vault NAME (or PDH_VAULT), else KDBX_FILE, else the default vault of the config, else the vault of the unlocked session. Config files, later ones overriding earlier ones: ~/.config/cprima-pdh/config.toml, ./pdh.toml, $PDH_CONFIG:

default = "<name>"
[vaults.<name>]
path = "relative/or/absolute.kdbx"

Safety

Read-only by default; every write is a dry run unless --apply, and is verified by reopening the saved file. pdh never copies or backs up the vault (backups are your job) and never prints a secret value.

Licence: Apache-2.0.

Metadata

Release files for cprima-pdh 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cprima-pdh 0.0.2
File Size Uploaded Provenance Actions
cprima_pdh-0.0.2.tar.gz 158.5 kB With provenance Details for cprima_pdh-0.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cprima-pdh 0.0.2
File Interpreter ABI Platform Actions
cprima_pdh-0.0.2-py3-none-any.whl Python 3 none any Details for cprima_pdh-0.0.2-py3-none-any.whl

Total release size: 279.9 kB

Release files / cprima_pdh-0.0.2.tar.gz

Download URL cprima_pdh-0.0.2.tar.gz
Size 158.5 kB
Tags Source
SHA-256 checksum
How to use checksums
68723e48ff1de04513339e650b4adc48378be39943df2675a7fb1aa0de686af7
BLAKE2b-256 checksum
How to use checksums
6e0e4ec4e0f39108cd7402b40b9065096b256a998bbe9e600abdfe2fb17f17a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.

Transparency log

Release files / cprima_pdh-0.0.2-py3-none-any.whl

Download URL cprima_pdh-0.0.2-py3-none-any.whl
Size 121.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5f158e63ee80bd4fa192b5f51a06a75447fc0bc5cb02941b881c51be5ccd37f8
BLAKE2b-256 checksum
How to use checksums
90dd2c766a0211fc11a3050547e847581a7862b7a19064782a222160df236c69
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.

Transparency log

Security for cprima-pdh 0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for cprima_pdh-0.0.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page