AGPL-3.0-or-later · forever.

the standard library

nika:write

Write a file · returns the path. overwrite defaults true · create_dirs defaults false. One of 28 builtins in the closed nika: namespace.

the file familyworkspace files: read, write, search (permits.fs-gated)

  • filefamily5 tools
  • 4argsdeclared contract
  • 2requiredcheck teaches a miss
  • 5skeletonsship this tool

the contract

4 args · 2 required

A missing required arg is a nika check finding before anything runs; the vocabulary below comes from the binary itself (nika catalog --tools --json), not from prose.

path*
stringdestination path
content*
stringthe content to write
overwrite
boolean
create_dirs
boolean

in a real file

from the chain skeleton
chain.nika.yaml
  persist:    with:      think: ${{ tasks.think.output }}    invoke:      tool: "nika:write"      args:        path: "${{ const.destination }}"   # SLOT: destination · same path as permits.fs.write        content: "${{ with.think }}"       # ALWAYS pass content · a write without it writes nothing    on_error:      # Golden rehearsal. Under `nika test` the mock plane simulates the      # MODEL, not effects — this write is refused (NIKA-452) so the pin      # lane needs this recover to walk its own scaffold. `nika run` never      # fires it on success (a recover only runs on failure). Delete this      # block once pointed at real data, so a genuine write failure is loud.      recover: "REHEARSAL · write refused under nika test — the real run persists to the destination"

a verbatim excerpt, real line numbers from chain.nika.yaml, conformance-gated upstream on every spec push. open the full skeleton →

cross-references

the check gates

the file family

5 tools

workspace files: read, write, search (permits.fs-gated).

Machines read the same vocabulary at /tools/catalog.json; the contract lives in spec 06 · stdlib. Install and ask the binary itself: nika catalog --tools. Read the spec →