AGPL-3.0-or-later · forever.

install · v0.105.0

一个二进制文件。你的机器。

两分钟到你的第一次 run。

Nika 是单个 Rust 二进制文件:没有 daemon,不需要账号,不强制 cloud。 在下面选一个入口,用免费的本地模型跑起你的第一个文件。

macOS · Linux · air-gapped OK

  1. 01 · homebrew

    一行命令

    有 Homebrew 的 macOS 或 Linux:立刻进入你的 PATH。 用 nika --version 确认。

    你应该看到的
    nika --versionnika 0.105.0

    real output · nika 0.105.0 · nika --version · re-captured at every release

  2. 02 · script

    不用 Homebrew

    经过验证的 release 二进制下载到 ~/.nika/bin,并打印出要加进 shell 配置文件的那一行 PATH。重开终端,nika --version 就有回应。

    curl -LsSf https://nika.sh/install.sh | sh

    已经带着 toolchain?cargo 直接拉取预编译的 release tarball, 无需编译(在 crates.io 发布之前二进制名为 nika-cli:给公开名字 做一次 symlink 即可)。nix 通过仓库的 flake 构建 release 的 精确源码;首次 run 编译,store 负责缓存。

    cargo binstall --git https://github.com/supernovae-st/nika nika-cli
    nix run github:supernovae-st/nika
  3. 03 · 手动

    air-gapped,或者手动来

    最新 release 下载对应平台的 tarball 和 SHA256SUMS,校验后把 nika 放进你的 PATH。它不会向任何地方发送数据。

    sha256sum -c SHA256SUMS --ignore-missing
  4. 04 · 编辑器

    编辑器扩展

    supernovae.nika-lang · 在 VS Code MarketplaceOpen VSX 上 (Cursor · Windsurf · VSCodium)。首次使用时自动下载匹配的 nika release 二进制,或复用你 PATH 上已有的那个。其他编辑器: nika lsp 通过 stdio 说 LSP · source + issues

  5. 05 · 智能体

    与你的智能体协作

    Nika 生来就是由智能体书写、由你审阅的。nika init 把 schema 接线和 AGENTS.md 放进你的仓库,让 Claude Code、Cursor、Codex 们第一次就写出合法的 workflow;nika wire 在你需要的地方加上 显式的 agent-tool(MCP)接线。

    nika init
    nika wire cursor
  6. 06 · 第一次 run

    零密钥,零 cloud

    nika welcome 开始,它是一面镜子:这台机器已经有什么 (编辑器 · 本地模型 · 密钥的存在与否,绝不读取值),以及下一步 去哪。你的第一个 workflow 不需要模型也不需要 API 密钥。保存文件, 用 nika check 审计(plan · 成本 · secrets,在任何东西运行之前), 然后 nika run。要加一个 AI 步骤?指向一个免费的本地模型 (一次 ollama pull,什么都不离开你的机器),nika doctor 会 准确告诉你接好了什么。

    nika welcome
    nika check hello.nika.yaml
    nika run hello.nika.yaml
    ollama pull llama3.2:3b
    nika examples run 01-hello --model ollama/llama3.2:3b
    nika doctor
    hello.nika.yaml
    nika: v1workflow:  id: hellotasks:  greet:    exec:      command: ["echo", "hello", "from", "nika"]
    你应该看到的
    nika check hello.nika.yamlnika check · hello.nika.yaml  PLAN     1 wave · 1 task · max parallelism 1      wave 1 greet (exec · echo)  COST     no inference tasks · $0.00  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 ○ PERMITS  no boundary declared (engine floor only) · `--infer-permits` writes one ↳ HINT     [permits] no `permits:` boundary declared — run `nika check --infer-permits` to generate the tightest one (default-deny once present)  audited · 1 task · 1 wave · permits none · est ≥$0.0000 · 1 hintnika run hello.nika.yaml  🦋 nika · hello · 1 task     permits ✓ engine floor (no boundary declared)    greet  exec · echo  4ms  ── 1/1 done · $0.00 · elapsed 0.0s ─────────────────────────────    trace: .nika/traces/2026-07-17T21-39-47Z-042f.ndjson · 5 events · chain e7a49a00ceacdc481547021c582c25066cc8f0ccdda4b54bedf71195dde8770d

    real output · nika 0.105.0 · nika check hello.nika.yaml · re-captured at every release

    hello-ai.nika.yaml
    nika: v1workflow:  id: hello-aimodel: ollama/llama3.2:3b   # local · free · swap for any provider in the catalogtasks:  greet:    infer:      prompt: "Say hello in one sentence."

如果卡住了

command not found: nika(安装脚本之后)

脚本安装到 ~/.nika/bin,并打印出要加进 shell 配置文件 (~/.zshrc~/.bashrc)的确切 PATH 行。加上它,重开终端, nika --version 就有回应。

export PATH="$HOME/.nika/bin:$PATH"
macOS 拦截了二进制(仅手动 tarball)

手动下载的二进制带着 quarantine 标记;brew 和安装脚本不带。 清除一次即可,或右键 → 打开。

xattr -d com.apple.quarantine ./nika
在公司 proxy 之后

安装脚本就是纯 curl;下载时遵循标准的 proxy 环境变量。二进制 本身不向任何地方发送数据。

HTTPS_PROXY=http://proxy:8080 curl -LsSf https://nika.sh/install.sh | sh
tarball 的 checksum mismatch

mismatch 意味着下载损坏或被篡改。不要运行它。从 release 页面 重新下载 tarball 和 SHA256SUMS,再校验一次。

sha256sum -c SHA256SUMS --ignore-missing

下一步: 5 分钟学会这个文件 · 浏览真实的 workflow · 完整文档