https://github.com/supernovae-st/nika
Intent as Code β the workflow language for AI. One file, 4 verbs, one Rust binary. Local-first, any model, AGPL-3.0. π¦
https://github.com/supernovae-st/nika
agents ai ai-agents ai-workflows automation cli dag developer-tools devops llm local-ai lsp mcp ollama rust structured-output supernovae workflow workflow-engine yaml
Last synced: 19 days ago
JSON representation
Intent as Code β the workflow language for AI. One file, 4 verbs, one Rust binary. Local-first, any model, AGPL-3.0. π¦
- Host: GitHub
- URL: https://github.com/supernovae-st/nika
- Owner: supernovae-st
- License: agpl-3.0
- Created: 2026-01-02T09:32:06.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2026-07-02T07:29:51.000Z (22 days ago)
- Last Synced: 2026-07-02T09:23:07.820Z (22 days ago)
- Topics: agents, ai, ai-agents, ai-workflows, automation, cli, dag, developer-tools, devops, llm, local-ai, lsp, mcp, ollama, rust, structured-output, supernovae, workflow, workflow-engine, yaml
- Language: Rust
- Homepage: https://nika.sh
- Size: 5.83 MB
- Stars: 10
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Citation: CITATIONS.md
- Security: SECURITY.md
- Roadmap: ROADMAP.md
- Agents: AGENTS.md
Awesome Lists containing this project
- awesome-data-engineering - Nika - Intent-as-code workflow engine for AI data pipelines: reviewable YAML DAGs statically checked (schema, permits, cost floor) before execution, with tamper-evident run traces. (Workflow)
- awesome-rig - nika - Semantic YAML workflow engine for AI tasks with DAG execution, MCP, and multi-provider LLM support. (Libraries and Frameworks)
- awesome-gemini-cli - nika - Read-only oracle for Nika AI workflows: validate .nika.yaml DAGs, explain findings, browse schema/examples, honest cost estimate β before a single token is spent (single Rust binary, config: command nika, args [mcp]). (MCP Servers)
- awesome-testing - nika - Workflow engine for AI with testing built in: `nika test` pins a workflow's offline behavior as a golden snapshot (deterministic mock provider, zero keys) and replays it in CI; every run also leaves a hash-chained trace for post-hoc verification. (Software / AI & LLM Testing)
- awesome-vibe-coding-resources - nika - Workflow engine for AI: capture repeatable vibe-coded tasks as .nika.yaml files, statically checked before execution (schema, permits, cost), with tamper-evident traces after. (Command Line Tools)
- awesome-ChatGPT-repositories - nika - Open-source (Rust, AGPL) workflow engine for AI: .nika.yaml DAGs statically checked before execution (schema/permissions/cost), tamper-evident traces after, local-first (Ollama/llama.cpp/vLLM), MCP client and server. (NLP / Usage)
README
# Nika
> **Intent as Code.** The workflow language for AI: one file, 4 verbs,
> one binary.
[](LICENSE)
[](https://github.com/supernovae-st/nika-spec)
[](Cargo.toml)
[](https://github.com/supernovae-st/nika/actions/workflows/diamond-ci.yml)
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.
## Does it run today?
Yes.
```sh
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:
```text
$ 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 βββββββββββββββββββββββββββ
```
## What a workflow looks like
```yaml
# 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 }} }
```
## Check before it runs
`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/`](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:

## Daily commands
```sh
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 --resume .nika/traces/.ndjson # skip journaled successes
nika run flow.nika.yaml --resume --answer approve=true # re-arm a paused gate
nika trace show .nika/traces/.ndjson # re-render any past run
```
A paused run exits `4` (a blocking `nika:prompt` journals its question);
cache hits on resume are always visible β nothing is skipped silently.
## Pick a workflow
The binary embeds a versioned pack of runnable examples. Browse with
`nika examples list`, read one with `nika examples show `, preview any
of them with `--model ollama/qwen3.5:4b` (or offline with `--model mock/echo`):
| I want to⦠| Run | For |
|---|---|---|
| Review a PR before merging | [`examples/pr-risk-review.nika.yaml`](examples/pr-risk-review.nika.yaml) | developers |
| Turn meeting notes into owned actions | `nika examples run showcase/t1-meeting-actions` | everyone |
| Digest a week of standups | `nika examples run showcase/t1-standup-digest` | teams |
| Draft release notes from commits | `nika examples run showcase/t2-release-notes` | maintainers |
| Triage a support inbox | `nika examples run showcase/t2-support-triage` | support Β· ops |
| Chase unpaid invoices politely | `nika examples run showcase/t2-invoice-chaser` | founders |
| Track competitors weekly | `nika examples run showcase/t3-competitor-radar` | founders |
| Screen resumes against a role | `nika examples run showcase/t3-resume-screener` | hiring |
| Build a Monday operating brief | `nika examples run showcase/t4-ceo-monday-brief` | founders |
The full gallery (27 workflows + 6 templates) lives in
[`examples/`](examples/): foundation patterns, business showcases, and the
skeletons `nika new --from ` instantiates.
## The model
Four verbs, and nothing else. A small core that composes into arbitrary
real-world workflows. The Unix and SQL discipline of "small surface, large
composition."
| Verb | What it does |
|---|---|
| `infer` | Call an LLM. Any provider, local or hosted |
| `exec` | Run a shell command |
| `invoke` | Call a tool or MCP server (an HTTP fetch, GitHub, a builtinβ¦) |
| `agent` | Run an autonomous loop with tools, until the task is done |
Everything sits under one frozen, versioned envelope, `nika: v1`, that won't
break. Three properties hold across every workflow:
- **Provider-agnostic, local-first.** Local Ollama or LM Studio, or any API.
Your workflow doesn't change when the model does.
- **Safe by construction.** A read-XOR-write capability model. A step that
reads cannot silently write; every effect is explicit and gated.
- **Reproducible.** The file and its execution trace are an auditable,
re-runnable record.
```mermaid
flowchart LR
F["workflow.nika.yaml
portable Β· readable Β· verifiable"] --> E["nika
single Rust binary"]
E -->|infer| L["LLMs
Ollama Β· LM Studio Β· any API"]
E -->|exec| S["shell"]
E -->|invoke| T["tools Β· MCP"]
E -->|agent| A["autonomous loop"]
```
Dependencies make every workflow a graph: independent tasks run in
parallel, an `agent` step fans out, joins wait for every branch β and the
whole plan is known, costed and audited before execution starts:

## Why Nika
The closest analogues aren't products. They're **standards**. SQL. The
Dockerfile. A portable specification with a reference engine. The language is
the contribution, not a product to sell.
As AI agents start acting on the real world, the interface where they act
can't be free text (too vague) or raw code (too risky). It has to be a
**verifiable action language**: one an AI writes, a human reviews and approves,
and a machine runs deterministically. Kept open and sovereign, not locked
inside one vendor's cloud.
What no existing workflow tool offers together: a single Rust binary Β· portable
declarative YAML Β· local-first Β· read-XOR-write capability security Β· AGPL Β·
no cloud required Β· bring-your-own-LLM.
## Status
Nika is built in the open.
The **language** (the `nika: v1` envelope and its four verbs) is stable and
won't break. The **engine** is a strict, modular Rust workspace. The latest
tagged public release is **v0.91.0**; `main` moves immediately to the next
`-dev` version after each release so local contributor binaries cannot be
confused with Homebrew assets. The 1.0.0 launch remains gated by the release
checklist, not by a date. The code, the
[spec](https://github.com/supernovae-st/nika-spec), and the
[example workflows](examples/) are all readable, and development happens on
`main` in the open.
The `nika: v1` language envelope is frozen forever. It is a separate axis from the
engine version. Every release is complete for its declared scope; no
half-features parked behind a future version.
## Get started
Install (macOS Β· Linux):
```sh
# Homebrew (macOS Β· Linux): on your PATH immediately
brew install supernovae-st/tap/nika
nika --version
# β¦or, without Homebrew: the install script. It downloads the verified release
# binary into ~/.nika/bin and prints the single PATH line to add to your shell
# profile (then reopen the terminal, or `source` it, and `nika --version` works).
curl -LsSf https://nika.sh/install.sh | sh
```
Prefer a guided page? Every install path, step by step: [nika.sh/install](https://nika.sh/install).
> Fully manual / air-gapped? Download the platform tarball + `SHA256SUMS` from the
> [latest release](https://github.com/supernovae-st/nika/releases/latest), verify
> with `sha256sum -c SHA256SUMS --ignore-missing`, then move `nika` onto your `PATH`.
Your first workflow runs with **zero setup**: no model, no API key:
```sh
cat > hello.nika.yaml <<'YAML'
nika: v1
workflow: hello
tasks:
- id: greet
exec:
command: "echo hello from nika"
YAML
nika check hello.nika.yaml # static audit, before a single token is spent
nika run hello.nika.yaml # execute locally
```
Adding an AI step? Point it at a local model and nothing leaves your machine:
```yaml
model: ollama/llama3.2:3b # local Β· or mistral/..., anthropic/..., any provider
tasks:
- id: greet
infer:
prompt: "Say hello in one sentence."
```
(No model handy? The built-in `mock/echo` previews any workflow offline.)
For real inference, run a local model (Ollama / LM Studio) or set a provider
key, then see what's wired:
```sh
nika doctor # provider keys + local servers, with the exact fix
nika init # schema wiring + AGENTS.md for this repo
nika wire cursor # explicit MCP wiring Β· also: vscode Β· windsurf Β· claude Β· codex Β· all
nika examples list # browse the embedded examples
nika examples run 01-hello --model ollama/llama3.2:3b # a real local run
```
From source (contributors): `git clone https://github.com/supernovae-st/nika.git && cd nika && cargo test --workspace --lib`. End-user docs: [docs.nika.sh](https://docs.nika.sh).
## Work with your agents
Nika is built to be **written by agents and reviewed by you**. `nika init`
drops the schema wiring, `AGENTS.md`, the Cursor rule and a repo-level
[agent skill](https://agentskills.io) into your repo so Claude Code, Cursor,
Codex and friends author valid workflows on the first try. `nika wire
` points each client's MCP config at
the engine β idempotent, and it preserves your other servers. `nika mcp`
exposes a read-only oracle (`nika_check` + `nika_explain`) any MCP client can
call. `nika lsp` speaks LSP to every editor.
Or install everything as a plugin β this repo hosts one plugin (the
`nika-authoring` skill + the MCP oracle) for both ecosystems:
```sh
codex plugin marketplace add supernovae-st/nika-agents && codex plugin add nika@nika
claude plugin marketplace add supernovae-st/nika-agents && claude plugin install nika@nika
```
Agents discover a working prompt chain once; Nika keeps it as a file your
team can check, run and replay.
## Send us a workflow
Do you repeat an AI task every week, in ChatGPT, Claude, Cursor, Codex, or
scripts? Describe it at [nika.sh/convert](https://nika.sh/convert) or
[open a "convert my workflow" issue](https://github.com/supernovae-st/nika/issues/new/choose).
We convert the best ones into runnable `.nika.yaml` examples, credited to you.
## Editor support
This repo is the **engine**. It ships the language server (`nika lsp`, over stdio).
The VS Code / Cursor / Windsurf / VSCodium **extension** lives in its own repo and
is published as [`supernovae.nika-lang`](https://marketplace.visualstudio.com/items?itemName=supernovae.nika-lang)
(and on [Open VSX](https://open-vsx.org/extension/supernovae/nika-lang) for Cursor / Windsurf / VSCodium):
- Install it from your editor's marketplace. It auto-downloads the matching `nika`
release binary on first use (or reuses the `nika` already on your `PATH`).
- Source + issues: [supernovae-st/nika-vscode](https://github.com/supernovae-st/nika-vscode).
- Any other editor: `nika lsp` speaks LSP over stdio. Wire it into any LSP client.
## Documentation
- **Language spec**: [supernovae-st/nika-spec](https://github.com/supernovae-st/nika-spec) (Apache-2.0), the runtime-agnostic Nika language.
- **End-user docs**: [docs.nika.sh](https://docs.nika.sh).
- **Website**: [nika.sh](https://nika.sh).
- **Examples**: [`examples/`](examples/), the embedded gallery (also `nika examples list`).
**Building Nika?** The engine is crafted under a strict workspace discipline:
context-window-sized crates, a per-crate admission checklist, zero `.unwrap()`
in `src/` (CI-enforced), downward-only layering. The design lives in
[`docs/architecture/`](docs/architecture/) and the decisions in
[`docs/adr/`](docs/adr/README.md); the roadmap is in [`ROADMAP.md`](ROADMAP.md).
## License
The **engine** is AGPL-3.0-or-later (see [`LICENSE`](LICENSE)): modify it and
run it as a hosted service, and users of that service get the source. The
**spec** is [Apache-2.0](https://github.com/supernovae-st/nika-spec), maximally
permissive for a standard.
A commercial license (Grafana model) is available for organizations that can't
accept AGPL's network clause. Contact `contact@supernovae.studio`. Security
reports: `security@supernovae.studio`.
---
Β© 2024β2026 [SuperNovae Studio](https://supernovae.studio) Β· π¦ Nika, the
butterfly on the SuperNovae flag. *Prompt once. Run forever.*