> ## 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.

# LocalNika client

> Construct and probe the zero-dependency driver for the released Nika binary.

export const LocalContract = () => <Tip>
    <strong>Live surface.</strong> <code>@supernovae-st/nika-client/local</code>
    drives the released <code>nika</code> binary through its versioned machine
    contracts. It is the production path today.
  </Tip>;

<LocalContract />

`LocalNika` is a thin process driver. It does not reimplement parsing,
planning, policy or execution. It calls the binary's machine surfaces with an
argv array and types the result.

## Construct the client

```ts theme={"system"}
import { LocalNika } from '@supernovae-st/nika-client/local'

const nika = new LocalNika({
  bin: '/opt/nika/bin/nika',
  cwd: '/srv/workflows',
})
```

Both options are optional. `bin` resolves through the explicit option,
`NIKA_BIN`, then `PATH`. `cwd` controls relative workflow paths and the trace
store used by the child process.

## Probe the engine

```ts theme={"system"}
const version = await nika.version()
console.info({ version })
```

The probe rejects when the binary cannot be spawned or reports a non-zero
exit. Run it at process startup when the application cannot operate without
Nika.

## Method map

<div className="sdk-flight sdk-flight-compact">
  <span>LOCALNIKA · RELEASED MACHINE SURFACES</span>

  <pre tabIndex={0}>
    {`version ───────────── nika --version
        check ─────────────── nika check --json
        dryRunPlan ────────── nika run --dry-run --json
        run / runToEnd ────── nika run --json
        test ──────────────── nika test
        traceVerify ───────── nika trace verify`}
  </pre>
</div>

The mapping matters: if a payload evolves, the engine owns its version
envelope and the SDK preserves unknown fields through `raw`.

## No shell around paths

The driver uses `spawn(binary, args)`. A workflow path is one argv value,
never text concatenated into a shell command.

<Info>
  This protects the application seam. It does not grant workflow authority.
  The engine still enforces permits, secrets and its hardened runtime floor.
</Info>

## Continue

<CardGroup cols={2}>
  <Card title="Check and plan" icon="list-check" href="/sdk/local/check-and-plan">
    Read the complete admission report.
  </Card>

  <Card title="Run and cancel" icon="circle-play" href="/sdk/local/run-and-cancel">
    Consume the journal and settled outcome.
  </Card>

  <Card title="Configuration" icon="sliders" href="/sdk/reference/configuration">
    Constructor and run option reference.
  </Card>

  <Card title="Source" icon="github" href="https://github.com/supernovae-st/nika-client/blob/main/src/local/index.ts">
    Read the exact process boundary.
  </Card>
</CardGroup>
