start here · live
Your first typed run.
Install the zero-dependency client, audit a real workflow, then run it through the local engine from TypeScript.
Start with the surface that ships. LocalNika drives the installed engine through versioned machine contracts, with no HTTP service and no runtime dependency.
Install both halves.
The package supplies the typed driver. The Nika release supplies the engine that actually checks and runs the workflow.
brew install supernovae-st/tap/nika
npm install @supernovae-st/nika-client
nika init --project-fileUse a workflow the spec already proves.
Copy the first file from the teaching path into workflows/hello.nika.yaml. nika.yaml governs the project around it; the *.nika.yaml file remains the executable intent.
Keep the verdict in the control flow.
Findings are a typed result, not an exception. Only start the run after the report is clean and the cost shape fits your policy.
import { LocalNika } from '@supernovae-st/nika-client/local'
const nika = new LocalNika()
const report = await nika.check('workflows/hello.nika.yaml')
if (!report.clean || report.cost?.has_unbounded) {
console.error(report.findings)
process.exit(1)
}
const run = await nika.runToEnd('workflows/hello.nika.yaml', {
maxCostUsd: 0.25,
})
console.log({ ok: run.ok, events: run.events.length })Run the application normally.
LocalNika resolves the binary from an explicit path, then NIKA_BIN, then PATH. The workflow path is passed as an argv value without a shell.
npx tsx run.ts