Command reference
turbot-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/turbot-web
skarbiec get <item> --field token | turbot-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; the archive is sent whole, whatever its size.
- The signed-in account bearer is read from standard input only, never from argv or the environment.
- TURBOT_API_URL names the product API origin and is required; it is validated before reading the bearer. Remote origins require HTTPS; HTTP is allowed for a host that resolves only to this machine's loopback interface addresses, such as localhost. A host that cannot be resolved is refused with the resolver's cause. Credentials, paths, queries and fragments are refused.
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. It does not print credentials or archive contents.
Refusals and safe exits#
- A missing path, an unsupported command or extra argument, an unsafe or unresolvable API origin, or no bearer on standard input exits 2. A path that does not exist exits 1 with `Archive not found: <path>`, one that is not a file with `Archive is not a file: <path>`, and one that cannot be inspected (permissions, I/O) with `Archive <path> cannot be inspected: <cause>`.
- An HTTP/API refusal, invalid response, validation failure, conflict policy, or storage failure is surfaced without claiming a partial import; an answer that is not JSON names the HTTP status, the parse cause and the body.