.nika file:
reviewable in a pull request, checked before anything executes, and
callable from TypeScript. The first run needs no account, no API key and
no server.
Your first result
Requires Node.js 22+ on macOS or Linux (arm64/x64).hello.nika:
demo.mjs:
mock/echo is a rehearsal model — it echoes the prompt so the
mechanics are real before you spend anything. Swap model: for a provider
from the catalog when you want a real
answer.
Prefer the terminal? The CLI runs the same file: nika run hello.nika.
Install the CLI ·
write the file by hand.
A real job, when you are ready
Meeting actions turns a transcript into typed, tracker-ready action items. It defaults to a local model (ollama/qwen3.5:4b, no provider key — your own compute); point it at a
cloud provider and nika check prices the run before anything executes.
Same file shape as above; the model and tools change, the lifecycle does
not.
What just happened, one concept at a time
- The file is the contract. The verbs
infer,exec,invokeandagent— nothing else: fetching a URL or writing a file is a tool underinvoke, declared and auditable. - Admission before execution.
run()audits the file before anything executes; a broken file throws before a run exists.nika checkis the same audit on its own, for CI. - Permits are the blast radius.
permits: {}declares zero authority. A workflow that touches a file, a host or a shell must say so, or admission refuses it (NIKA-AUTH-006). - Runs leave evidence. Each run writes a hash-chained trace under
.nika/traces/; when a receipt is present,traceVerifyreads it back. Verification proves the record was not tampered with — not that a model was right.
Ask the file three questions
What changes if a required input is missing?
What changes if a required input is missing?
The run refuses to start — the CLI exits 3 naming the missing key
(
NIKA-1708), the SDK throws NikaOperationError. Nothing is
half-executed; a red admission never becomes a run.What changes if a permission is absent?
What changes if a permission is absent?
The task that needs it is refused at check. An absent
permits: block
means zero authority — effects stay refused until the file declares
them (NIKA-AUTH-006). nika check --infer-permits drafts the
tightest block for you.What changes if I switch the model?
What changes if I switch the model?
One line.
mock/echo rehearses offline, ollama/qwen3.5:4b runs
locally, cloud providers take their env key. The file, the check and
the receipt keep the same shape — check re-prices the run for the
new seat.Where next
SDK quickstart
Checks, live events, inputs and receipt verification — the full typed
lifecycle on the published npm package.
First workflow
Write a workflow by hand: tasks, bindings, structured output.
Examples · real jobs
Starter chains to multi-step reports, every file runnable.
Providers
Local-first model choice: Ollama needs no provider API key, cloud
providers when you need them.
These docs track the current stable engine, v. The npm
package releases on its own channel; each page names the channel it
means.