> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nika.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

> Say what you want done and keep it as a file: checked before it runs, run with the model you choose, proven afterwards.

**Say what you want done. Keep it as a file.** Nika turns repeatable AI
work into a small `.nika` workflow you keep. Before anything runs, its check
shows what the workflow will do, which models and tools it uses, what it may
touch and what it can cost, without calling a model. You run it when you
decide, with the model you choose, local or cloud, and every run leaves a
tamper-evident record you can verify. One open-source binary: no Nika account
and no hosted service.

| 1 · Say it | 2 · Check it | 3 · Run it | 4 · Prove it |
| :-: | :-: | :-: | :-: |
| Describe the job in the [Session](https://docs.nika.sh/getting-started/session.md), or write the file | `nika check` audits it before any model is called | `nika run` with the model you choose | `nika trace verify` checks the run's record |

0.124 is the current release line. Work stays focused on maintenance,
security and the media capabilities workflows need; native video is planned
for 0.125.

<video autoPlay muted loop playsInline controls poster="/images/posters/nika-hero.png" aria-label="nika check auditing a meeting-notes workflow before any model is called, then a local model running it and writing typed action items" alt="nika check auditing a meeting-notes workflow before any model is called, then a local model running it and writing typed action items">
  <source src="https://mintcdn.com/supernovae-acdf3706/3tG2rJOQxMP3h2LO/videos/nika-hero.webm?fit=max&auto=format&n=3tG2rJOQxMP3h2LO&q=85&s=ab6afc72879e9bc74c07b1818a4cf2ff" type="video/webm" />

  <source src="https://mintcdn.com/supernovae-acdf3706/3tG2rJOQxMP3h2LO/videos/nika-hero.mp4?fit=max&auto=format&n=3tG2rJOQxMP3h2LO&q=85&s=ac1cf5c409316d3c83b680a5763f4435" type="video/mp4" />
</video>

**Audit first, then run.** A meeting-notes job you would otherwise redo in a chat, kept as one `.nika` file: `nika check` audits it before any model is called, then a local model (`ollama/llama3.2:3b`) turns a sample transcript into typed action items and the run leaves a hash-chained record. *Captured from the real CLI, on one machine, with no API key: the check on nika 0.121.0, the local-model run on nika 0.109.2. The file is a shorter demo version of the [meeting actions](https://docs.nika.sh/examples/meeting-actions.md) example.*

## Your first result

[Install the CLI](https://docs.nika.sh/getting-started/installation.md), then work in an empty
directory. This example calculates a total and writes `report.md` using
built-in tools. It needs no model, API key, account or network connection.

Save this as `report.nika`:

```yaml report.nika theme={"system"}
nika: order-report
permits:
  tools: ["nika:jq", "nika:write"]
  fs:
    write: ["./report.md"]
const:
  orders:
    - {id: a, amount: 10}
    - {id: b, amount: 20}
tasks:
  summarize:
    invoke:
      tool: nika:jq
      args:
        input: ${{ const.orders }}
        expression: '{count: length, total: (map(.amount) | add)}'
  save:
    with:
      summary: ${{ tasks.summarize.output }}
    invoke:
      tool: nika:write
      args:
        path: ./report.md
        content: |
          # Order report
          Orders: ${{ with.summary.count }}
          Total: ${{ with.summary.total }}
outputs:
  summary: ${{ tasks.summarize.output }}
  report: ${{ tasks.save.output }}
```

Check the file, run it, and read the result:

```bash theme={"system"}
nika check report.nika
nika run report.nika --output json
cat report.md
```

The run returns:

```json theme={"system"}
{"report":"./report.md","summary":{"count":2,"total":30}}
```

The file contains:

```markdown theme={"system"}
# Order report
Orders: 2
Total: 30
```

These are actual calculations and a file write, with no model or mock
response. Re-running replaces only the declared `report.md`. The
`with:` binding makes `save` wait for `summarize`; `permits:` names the
allowed tools and output file.

The run prints a trace path under `.nika/traces/`. `nika trace verify` reads
the latest one (pass a path to pick another) and checks the record's
integrity. A fresh machine without a signing key reports **UNSEALED**, even
when the hash chain is intact: run `NIKA_KEYCHAIN=off nika key init` once and
later runs report **SEALED** ([Seal your runs](https://docs.nika.sh/getting-started/installation.md#seal-your-runs)). A
successful verification does not establish that a model's answer is correct.
See [traces](https://docs.nika.sh/concepts/traces.md) for the evidence tiers.

Continue with [offline examples](https://docs.nika.sh/examples/offline.md) for known inputs and
exact expected outputs, the [terminal Session](https://docs.nika.sh/getting-started/session.md) to
describe a job in your own words, or the
[TypeScript quickstart](https://docs.nika.sh/sdk/start/quickstart.md) to run workflows from an
application. The SDK starts its bundled engine directly; no server is needed.

## A real job, when you are ready

[Meeting actions](https://docs.nika.sh/examples/meeting-actions.md) 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.
`nika try meeting-actions` rehearses it on the mock model, with no key and no
model call, and the page lists what a real run needs. Same file shape as
above; the model and tools change, the lifecycle does not.

## What just happened, one concept at a time

1. **The file is the contract.** The verbs `infer`, `exec`, `invoke` and
   `agent` — nothing else: fetching a URL or writing a file is a *tool*
   under `invoke`, declared and auditable.
2. **Admission before execution.** `nika run` audits the file before anything
   executes; a refused file never starts. `nika check` is the
   same audit on its own, for CI.
3. **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-SEC-004`; with no `permits:` block at
   all, `NIKA-AUTH-006`).
4. **Runs leave evidence.** Each run writes a hash-chained trace under
   `.nika/traces/`; `nika trace verify` inspects the record and reports whether it is sealed.
   Verification proves the record was not tampered with — not that a model
   was right.

## Ask the file three questions

> [accordion] What changes if a required input is missing?
>
> For an input marked `required: true` with no `default:`, the run refuses
> to start: the CLI exits 3 naming the missing key (`NIKA-1708`), and the
> SDK's `run()` throws `NikaOperationError`. Nothing is half-executed; a red
> admission never becomes a run.

> [accordion] 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.

> [accordion] What changes if I switch the model?
>
> One line. `mock/echo` rehearses with no key and no model call (tools and
> fetches stay real), `ollama/llama3.2:3b` runs locally, and cloud providers
> take their environment key. The file, the
> check and the record keep the same shape; `nika check` re-prices the run
> for the new model, and asks for a larger `max_tokens` when a reasoning
> model needs room to think.

## Where next

> [card] [SDK quickstart](https://docs.nika.sh/sdk/start/quickstart.md)
>
> Checks, live events, inputs and receipt verification — the full typed
> lifecycle on the published npm package.

> [card] [First workflow](https://docs.nika.sh/getting-started/first-workflow.md)
>
> Write a workflow by hand: tasks, bindings, structured output.

> [card] [Examples · real jobs](https://docs.nika.sh/examples/overview.md)
>
> Starter chains to multi-step reports: every file passes `nika check`, and
> each page lists what it needs to run.

> [card] [Providers](https://docs.nika.sh/concepts/providers.md)
>
> Your model choice: local inference (Ollama needs no provider API
> key) or a hosted provider when you need one.

> [!NOTE]
>
> These docs track the current stable engine, v0.124.4. The npm
> package releases on its own channel; each page names the channel it
> means.

## The Nika ecosystem

> [card] [Documentation](https://docs.nika.sh/introduction.md)
>
> Guides, reference contracts and working examples.

> [card] [Language spec](https://github.com/supernovae-st/nika-spec)
>
> the nine-key envelope, Apache-2.0. The contract these docs explain.

> [card] [Engine source](https://github.com/supernovae-st/nika)
>
> Rust, AGPL-3.0-or-later. Every commit public.

> [card] [TypeScript SDK](https://docs.nika.sh/sdk/overview.md)
>
> Use one typed lifecycle locally or against authenticated nika serve HTTP.

> [card] [Editor extension](https://marketplace.visualstudio.com/items?itemName=supernovae.nika)
>
> The editor extension, frozen at 0.120 and not qualified with 0.124: use `nika lsp` and the JSON Schema.

> [card] [Homebrew tap](https://github.com/supernovae-st/homebrew-tap)
>
> `brew install supernovae-st/tap/nika` for the latest tagged CLI release.

> [card] [SuperNovae](https://supernovae.studio)
>
> The Paris studio crafting Nika. 🦋

You are reading Nika's documentation. For programmatic discovery: each
page has a Markdown export at `<url>.md` (for example
`https://docs.nika.sh/introduction.md`). The canonical engine state lives
at `/reference/status` (it imports `/snippets/_status-snapshot.mdx`, whose
binary fields `scripts/mintlify-snapshot.sh` and
`scripts/mintlify_snapshot.py` project from the released binary). Do not
quote hard-coded counts. Import `STATUS` for version and engineSha.
Language counts live in `CANON`. Live-state integers that the downloadable
binary does not project stay off these pages.

🦋


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.