CLI command

skarbiec history

List every saved version of one item, so the stamp restore --at takes is read rather than guessed, and, when asked, which fields each version changed.

Invocation#

Shell
skarbiec history <id> [--changes]

Purpose#

List every saved version of one item, so the stamp restore --at takes is read rather than guessed, and, when asked, which fields each version changed.

Required inputs and options#

  • One positional item id; a trashed item is listed too. --changes opens every saved version to compare it with the one before.

Output and state effects#

  • Prints id, item_uid, state, revision and versions: one entry per historical revision, oldest first, then the current one, each with at (the stamp restore --at takes), revision, kind, written_by, operation_id and current. A version written before revisions carried their own number or kind reports null for it. It decrypts nothing and changes no state. With --changes it prints id and changes instead: for each version after the first, at plus the field names it added, removed and changed against the version before; a version that will not open is listed with its error and the comparison continues from the last version that did. No value, length or digest is printed. The operator API answers both at POST /v1/operator/items/history with {"id": ..., "changes": true}.

Refusals#

  • Refuses an id the vault does not hold with `no item: <id>`, and an item whose stored history is not a list. A missing id exits 2 with `usage: history <id> [--changes]`.