Skip to main content

Module batch_create

Module batch_create 

Source
Expand description

memstead batch-create --from <file.json> — create many entities in one call: one workspace load, one commit per touched mem, all-or-nothing with report-all refusals.

Each entry is the same shape the single-entity create --from accepts (minus a per-entry dry_run — rehearsal is batch-level via --dry-run, which validates the whole batch and commits nothing), and carries its own provenance note. There is deliberately no batch-level note flag.

Intra-batch references resolve as REAL targets: an entry’s relations (and body wiki-links) may point at entities created by sibling entries in the same batch — cycles included where the schema permits them — with full target-type shape validation and no transient stubs.

{ "creates": [
    { "title": "Alpha", "entity_type": "spec",
      "sections": { "identity": "..." },
      "relations": [ { "to": "specs--beta", "type": "USES" } ],
      "note": "why alpha exists" },
    { "title": "Beta", "entity_type": "spec",
      "sections": { "identity": "..." } }
] }

Structs§

Args

Functions§

run