Spis/Docs

CLI command

spis reference-record

Add, inspect, edit, or remove one numbered product reference in a managed catalog.

Invocation#

bash
spis reference-record <add|get|edit|remove> [flags]

Add, inspect, edit, or remove one numbered product reference in a managed catalog. --help anywhere prints the usage and exits 0 without reading a catalog.

Subcommands#

  • `add` — scaffold a numbered partial record.
  • `get` — print a joined record view.
  • edit <catalog> <NN|slug> [--source-url U] [--category C] [--selection-note S] [--owner O] — change the metadata add recorded; at least one flag is required, and --name/--visual are refused because they are the record's identity.
  • `remove` — delete and renumber a record.

Inputs and options#

  • Choose the add, get, edit, or remove leaf and supply its documented inputs.

Output and state effects#

The add, edit and remove leaves update catalog JSON and regenerate the reference index; edit prints edited CATALOG/IDENTIFIER: NAME (FIELDS). get is read-only and prints a joined JSON view.

Spis Desktop exposes the same operation under Manage → select a product type → Edit beside a record. Fill only the metadata to change and choose Save changes; blank fields stay unchanged. A refusal keeps the editor open with the backend cause. The loopback POST /v1/reference-edit endpoint takes slug, a positive record number, and one or more nonempty sourceUrl, category, selectionNote, or owner fields. It invokes the CLI edit operation and streams its result; record identity and retained evidence are not editable.

Refusals#

These messages are emitted by the current Rust implementation. Every refusal of the invocation itself exits 2; a failure of a well-formed command exits 1.

  • No leaf is refused with the complete usage: spis reference-record <add|get|edit|remove> [flags] synopsis.
  • An unknown leaf is refused as reference: unknown command "NAME"; it takes add, get, edit or remove followed by the synopsis.
  • edit without a flag is refused as reference: edit changes nothing without at least one of --source-url, --category, --selection-note or --owner.