CLI command

skarbiec detach

Get a kept file back out of the vault when it is needed.

Invocation#

Shell
skarbiec detach <id> <out-file>

Purpose#

Get a kept file back out of the vault when it is needed.

Required inputs and options#

  • The item id and a path that does not exist yet, relative to the working directory or absolute.

Output and state effects#

  • Decodes the item's content_base64 and writes it owner-only from the first byte, appends file-detached with the item and size, and prints ok, item, file_name, out and bytes. POST /v1/operator/items/detach takes id and an absolute path on the machine the app runs on; Desktop's item inspector offers Save the attached file for an item holding one.

Refusals#

  • A missing id or path exits 2 with the usage. An existing path is refused with `<path> already exists; name a path that does not, so nothing is overwritten`, an item with no content_base64 with `<id> holds no content_base64; only an attached or imported file can be detached`, content that is not Base64 naming the item, and an item that will not open with its decryption error. The operator route refuses a path that is not absolute.