Skip to content

feat: add id command to read personal identity items#407

Open
zmainen wants to merge 1 commit into
Dashlane:masterfrom
zmainen:feat/id-command
Open

feat: add id command to read personal identity items#407
zmainen wants to merge 1 commit into
Dashlane:masterfrom
zmainen:feat/id-command

Conversation

@zmainen

@zmainen zmainen commented Jul 16, 2026

Copy link
Copy Markdown

What

Adds a read-only dcli id command that retrieves structured personal identity items from the local vault: passports, ID cards, identities, driver's licenses, social security IDs, and tax numbers (fiscal statements).

Why

These item types are already synced into the local vault by dcli sync and decrypt with the existing crypto path — but there was no command to display them. Today password, note, and secret are the only personal-data readers, so passports/IDs/tax-numbers are invisible from the CLI even though the data is present locally. This closes that gap.

How

The handler (command-handlers/personalInfo.ts) mirrors secureNotes.ts:

  • selects transactions of types IDENTITY, PASSPORT, IDCARD, DRIVERLICENSE, SOCIALSECURITYID, FISCALSTATEMENT with action = 'BACKUP_EDIT'
  • reuses the generic decryptTransactions (no crypto changes)
  • exposes every KWDataItem field dynamically — the item's root element name varies by type (KWPassport, KWIDCard, KWIdentity, …), so it's read generically rather than hard-coding fields. This keeps it robust across all personal-info types and any fields they carry.
  • tags each item with its transaction type (primary filter key) and kwType

Supports text and json output and the standard <param>=<value> filter syntax, consistent with the other read commands.

dcli id                                   # all personal ID items (text)
dcli id -o json                           # all items, all fields, as JSON
dcli id type=passport                     # only passports
dcli id type=fiscalstatement firstName=john

Notes

  • Read-only, consistent with the rest of the vault-access surface.
  • No new dependencies; types added to types.ts (PersonalInfoTransactionContent, VaultId) following the existing SecureNote/Secret pattern.
  • Docs added under documentation/pages/personal/vault.mdx.
  • yarn lint clean; yarn build succeeds; verified end-to-end against a real vault (passport / ID card / identity / fiscal-statement items returned and decrypted correctly in both output modes).

Adds a read-only `dcli id` command that retrieves structured personal
identity items already synced into the local vault but previously
undisplayable: passports, ID cards, identities, driver's licenses,
social security IDs, and tax numbers (fiscal statements).

The decryption path is unchanged — decryptTransactions is generic — so
the handler mirrors the secure-note handler and exposes every KWDataItem
field dynamically, keeping it type-agnostic across all personal-info
item types. Supports text and json output and the standard filter syntax.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant