Nika – Intent as Code for AI Workflows Nika is a new open-source workflow language for AI that turns repeatable AI tasks into portable, auditable files. The tool, built as a single Rust binary, allows users to define workflows with four verbs and run them locally on any LLM without cloud dependency, with static auditing before execution. Intent as Code.The workflow language for AI: one file, 4 verbs, one binary. Useful AI work shouldn't disappear into chats. Nika turns repeatable AI work into files you can run, review, diff and share. If you do the same AI task twice, make it a workflow. A Nika workflow is just a file: readable, portable, verifiable. It runs locally, on whichever LLM you choose, with no cloud required. The language is an open Apache-2.0 spec https://github.com/supernovae-st/nika-spec ; this repo is the reference engine, a single Rust binary AGPL-3.0 . The way SQL pairs with PostgreSQL, or the Dockerfile with Docker. Yes. brew install supernovae-st/tap/nika or: curl -LsSf https://nika.sh/install.sh | sh nika examples run 01-hello --model mock/echo zero setup: no key, no model server nika examples run 01-hello --model ollama/qwen3.5:4b got Ollama? the same run, real + local Nika audits a workflow before a single token is spent plan, cost ceiling, secret flows, types, tool args , then runs it: bash $ nika check brief.nika.yaml ✔ PLAN 2 wave s · 2 task s · max parallelism 1 ✔ SECRETS no information-flow escapes ✔ TYPES every deep output reference fits its declared shape ✔ TOOLS every nika: tool names a canonical builtin ✔ ARGS every invoke arg key is declared + every required arg is present ✔ SCHEMA every authored schema: is satisfiable ✔ clean — audited before a single token was spent $ nika run brief.nika.yaml 🦋 nika · daily-brief · 2 tasks ✔ fetch notes exec · cat ✔ brief infer · ollama/llama3.2:3b ── 2/2 done · $0.000 · elapsed 16.2s ─────────────────────────── review.nika.yaml: read a PR diff, judge its risk, comment only when it's high. nika: v1 workflow: pr-risk-review model: ollama/qwen3.5:9b local by default. swap to any provider tasks: - id: diff exec: a read-only shell command exec: command: "git diff origin/main...HEAD" capture: structured - id: assess infer: structured LLM judgment with: { patch: ${{ tasks.diff.output.stdout }} } infer: prompt: "Risk-assess this diff secrets, breaking changes, missing tests . Be terse.\n${{ with.patch }}" schema: type: object required: risk properties: risk: { type: string, enum: low, medium, high } - id: comment invoke: the only write, gated on the verdict when: ${{ tasks.assess.output.risk == 'high' }} invoke: tool: "mcp:github/pr-comment" args: { body: ${{ tasks.assess.output }} } nika check is a static audit. It catches broken references, missing dependencies, schema and permission problems before any model is called — and when something is off, it points at the exact fix: The two fixtures behind this capture live in scripts/media/fixtures/ /supernovae-st/nika/blob/main/scripts/media/fixtures , gated in both directions by scripts/media/validate-media.sh : the broken one must keep failing nika check , the fixed one must stay clean.The same audit holds the workflow's declared blast radius . A permits: block makes the file itself the security boundary — hosts, paths, programs, tools, all default-deny once declared. A task that reaches beyond it is caught statically, with the machine-applicable fix, before anything runs: And failure handling is part of the file, not an ops runbook. When a task dies, on error: recover: degrades to a declared fallback — the run completes, and the output says what it is: nika:image generate renders through the same discipline as everything else — a declared permits: boundary gates every save, the run ledger meters real spend, and provenance is structural, not a promise: Local-first — provider: local speaks the OpenAI-images wire any self-hosted server exposes LocalAI · Ollama · stable-diffusion.cpp · SGLang · vLLM-Omni . The base URL is engine config, never workflow data. Clouds when you choose: openai · gemini · xai — and mock renders real, decodable PNG files offline for CI. Provenance survives — every saved PNG carries a cp nika tEXt chunk tool · engine · provider · model · prompt · seed , the practice ComfyUI and InvokeAI standardized and no other workflow engine ships. The sidecar manifest adds sha256, resolved request and timing. Honesty is enforced — magic bytes beat declared MIME types, lossy provider mappings warn loudly, a provider returning fewer images than asked is a visible count shortfall: , result URLs are never fetched, and base64 never rides workflow outputs — assets, not blobs. Real spend in the ledger — a render's exact cost xAI bills in ticks lands on the task line and the run total, the same honest-spend channel infer: uses. nika inspect flow.nika.yaml anatomy · tasks · waves · cost floor nika check flow.nika.yaml the audit · exit 0 clean · 2 findings nika explain NIKA-VAR-001 any code · cause · category · fix-form nika run flow.nika.yaml --var topic=rust launch inputs · repeatable nika test flow.nika.yaml --update pin the golden · then nika test = offline CI nika run flow.nika.yaml --task hero regenerate ONE task + its upstream cone nika run flow.nika.yaml --resume .nika/traces/