Command reference

needher-archive export <archive.json> < bearer

Export the signed-in account’s retained companion archive to a new owner-only JSON file.

Install and invoke

npm install --global github:wisent-ai/needher-ai-web

skarbiec get <item> --field token | needher-archive export ./needher-export.json

# From an installed checkout
skarbiec get <item> --field token | npm run archive -- export ./needher-export.json

Inputs and environment

  • The positional path is the destination. It must not already exist.
  • The signed-in account bearer is read from standard input only, never from argv or the environment.
  • NEEDHER_API_URL is required and has the same origin rules as import.

Output and state effect

  • GETs /api/companion-archive with bearer authentication.
  • Creates the destination exclusively with mode 0600, then prints {"exported": "<path>"}, or exported: <path> with --text.

Refusals and safe exits

  • Exit 2: a missing bearer, a missing path, an unsupported command, an unset NEEDHER_API_URL or an unsafe API origin.
  • Exit 1: an HTTP/API refusal or an existing/unwritable destination. Existing files are never overwritten.

Related documentation

See the GUI archive guide for first-run controls, accepted archive contents, duplicate handling, and transaction semantics, or return to the complete needher-archive command index.