Command reference
needher-archive import <archive.json> < bearer
Validate and transactionally import one companion-archive v1 JSON file into the signed-in account.
Install and invoke
npm install --global github:wisent-ai/needher-ai-web
skarbiec get <item> --field token | needher-archive import ./archive.json
# From an installed checkout
skarbiec get <item> --field token | npm run archive -- import ./archive.jsonInputs and environment
- The positional path must name an existing regular file no larger than 10 MiB.
- The signed-in account bearer is read from standard input only, never from argv or the environment.
- NEEDHER_API_URL names the product origin and is required; without it the CLI refuses before reading the bearer. Remote origins must use HTTPS, while HTTP is allowed only for localhost or 127.0.0.1.
Output and state effect
- POSTs the original archive bytes to /api/companion-archive with bearer authentication.
- On success, prints one JSON object containing imported, unchanged, conflicting, and rejected counts, or the same fields as name: value lines with --text. It does not print credentials or archive contents.
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: a missing or non-file path, an archive over 10 MiB, or an HTTP/API refusal, invalid response, validation failure, conflict policy or storage failure, surfaced without claiming a partial import.
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.