Skip to main content

NIIA CLI

NIIA is the continuity and integration layer of Monolex. It remembers work across AI CLIs, joins code/document/git intelligence, and provides guarded entrances to terminal sessions, MCP services, remote machines, and the operating system. Documents NIIA 0.9.41.

NIIA is beside the models

NIIA does not replace Claude Code, Codex, Grok, OpenCode, Gemini, or agy. Each tool keeps its own provider, subscription, interface, and session format. NIIA reads the durable artifacts those tools leave behind and can drive their real terminal sessions through the Monolex PTY surface.
Closing NIIA does not make the provider CLIs stop working. Closing one provider CLI does not erase the session evidence NIIA has already indexed.

Four planes

The Mono stack

NIIA calls each layer through its public contract. For example, niia code context uses Monogram, cross-database insight and drill commands compose Monoflow, and niia convergence reaches the knowledge coverage owned by Work Wiki. The standalone CLIs expose their complete command and storage boundaries.

A normal work entry

For non-trivial work, NIIA’s entry discipline asks you to match process to uncertainty: The doctrine itself is queryable:
NIIA 0.9.41 can carry that doctrine as a report-only bracket:
gauge writes the selected rung, signals, promise, and append-only history to a session witness. Only a hook-carried session id may move the atomic current pointer; an explicit CLI --session witness cannot steal it. finish re-presents that promise and writes the close witness; audit-entry reports only against what the machine-gauged session promised. None of these commands gates the user. Hook-internal errors remain visible in ~/.niia/hook-error.log without blocking the prompt. doctor separately checks the databases, the watcher’s dirty-index verdict, all three hook lanes, and the witness path using metadata rather than a corpus scan. See the complete command map for options, storage paths, thresholds, and the current Codex-audit limitation.

Memory across AI CLIs

Reading a known session and searching the indexed session corpus are different operations. session read works from a provider’s discovered session source; session search queries the explicit session index.

Real terminal orchestration

NIIA drives the interactive CLI that is already running in a PTY. It does not substitute an API call or hide a provider-specific transcript behind a generic chat wrapper. Two answer readers exist because two truths can differ:
  • niia get-answer reads the rendered terminal screen.
  • niia get-answer-system parses the provider’s own transcript or output file.

MCP in both directions

The supported NIIA MCP server is niia mcp. The retired standalone rust-niia-mcp binary is not the current registration target.

OS and remote ownership

NIIA owns the authorization and routing boundary, not every operation body:
  • niia observe and niia control gate and forward OS work to Kernel CLI.
  • niia serve, daemon, devices, remote, and mailbox forward to Monosystem, the current transport owner.
  • MonoSurf owns browser-page DOM and session automation; Kernel CLI owns the native UI outside the page.

Install

niia setup is drift-aware: locally evolved files are preserved unless destructive replacement is explicitly requested. On Unix, niia setup use openclis selects OpenCLIs with a symlink from ~/.niia/bin/niia to ~/.openclis/bin/niia; later updates follow the link. setup use monolex installs a regular copy instead. On Windows, the OpenCLIs selector copies the executable, so invoke it from the newly updated OpenCLIs path whenever the PATH-facing copy must be refreshed:
That copies the released niia.exe to $HOME\.niia\bin\niia.exe. Version 0.9.41 writes no .niia-source marker, and its status detector classifies a regular Windows copy as monolex; verify the selected payload with Get-Command niia and niia --version.

Next pages

Complete commands

The 62 top-level commands and all MCP-visible nested operations.

AI sessions

Provider formats, indexing, reading, searching, and PTY continuation.

Consciousness core

The 27-document embedded core and its graph navigation commands.

Security model

Trust, unlock scopes, MCP failures, remote restrictions, and ownership.