Skip to main content
Builtins catalog / nika:edit

File

Tool family from the canonical registry.

invoke

Call this builtin through the invoke verb.

Read this contract

This reference preserves the specification at the revision linked below. Source examples are fragments: their surrounding tasks, inputs and permissions are not supplied here. Consult engine status and nika catalog --tools --json for the installed implementation; a registry declaration is not a runtime qualification.

Usage and behavior

illustration
In-place find/replace · returns the modified path. find: is a literal string (not a regex: use nika:grep to locate · jq to transform) · replaces all occurrences · count: (when set) caps replacements to the first N. count: MUST be a non-negative integer — a present non-integer (e.g. the string "2") is a loud -001 arg error, NEVER silently the replace-all default (that silent fall-through would over-edit the file · the intent-inversion footgun class). Throws · NIKA-BUILTIN-EDIT-001 (find: matched nothing: an edit that edits nothing is an authoring bug · tool_error · also a non-integer count:) · -002 (IO failure).

Arguments

Pass the values required by the tool contract.

Permissions

Understand authority before granting effects.

Errors and recovery

Read diagnostics and choose a recovery policy.

Workflow templates

Put the fragment inside a complete workflow.

Contract provenance

Read the pinned specification · Canonical registry. Tool identity: nika:edit. Specification revision: f8c5df2127c7. The Lab language identity is language:tool:edit; the registry view is ecosystem:tool/nika:edit. They refer to this contract without merging their graph identities.