Skip to content

CLI & ABI Reference

ostk is structured as a microkernel. It separates the human user experience from the agent program interface.

The CLI you run in your terminal is the Operator Overlay, optimized for human ergonomics, scripting, and visualization. Underneath, all operations go through the System ABI, a stable, schema-validated JSON-RPC interface that agents call directly via the MCP bridge or the UNIX domain socket.

Operator Overlay vs. System ABI

This decoupled architecture ensures that developer tools and terminal commands can evolve rapidly without breaking existing agent implementations or custom toolchains.

OPERATOR OVERLAY (HUMAN)

Clap-style terminal commands and interactive UI utilities. Safe to alias, format, and rename.

ostk boot — Load the kernel and verify trust anchors
ostk daemon — Spawn background socket server
ostk tui — Live dashboard and manual work entry
ostk ps — POSIX-compliant fleet process tree
ostk run <file> — Load and execute Agentfile
SYSTEM ABI (AGENT)

Strictly typed, version-hashed JSON-RPC schema. Frozen between major releases.

read — Offset-safe file reads with token estimation
fs_ops — Generation-tracked atomic write/edit
bash — Landlock-sandboxed shell command executor
spawn — Spawn long-lived driver with wait conditions
interact — Read/write streams of running processes

FS_OPS: Atomic Generation-Tracked Edits

The most critical verb in the System ABI is fs_ops. Unlike naive file writes, fs_ops integrates with gen_table.jsonl to implement Optimistic Concurrency Control (OCC). It supports two modes:

1. Quick Mode (Single File CAS & Writes)

Optimized for single-target changes. Quick mode is triggered by providing a top-level path.

  • Compare-and-Swap (CAS) Edit: Provide path, old_str, and new_str. The kernel verifies that old_str matches the file content exactly and is unique before replacing it with new_str. If multiple occurrences match and replace_all is not true, the call errors.
  • Full File Write: Provide path and new_str (omit old_str). The kernel overwrites or creates the file.
  • Directory/File Creation: Use op: "mkdir" or op: "write" as a discriminator for non-content adjustments.

2. Batch Mode (Multi-File Atomic Transactions)

For multi-file operations (like renaming a module and updating all its import references), pass an array of operations in the ops parameter. All operations run sequentially within a single audit transaction.

Example batch JSON payload:
{
  "ops": [
    { "method": "shell.run", "cmd": "mv src/old.rs src/new.rs" },
    { "method": "file.str_replace", "path": "src/lib.rs", "old": "pub mod old;", "new": "pub mod new;" },
    { "method": "file.str_replace", "path": "src/main.rs", "old": "use crate::old;", "new": "use crate::new;" }
  ]
}
        

Inspecting the Kernel Envelope

Every action requested of the microkernel is wrapped in a JSON-RPC 2.0 request envelope. The envelope enforces tracking, permission caps, and concurrency guards. You can interface with it in three ways:

1. CLI Dispatch Wrapper

Use the ostk dispatch operator command to load a verb and run it directly with arguments as JSON.

TERMINAL
$ ostk dispatch fs_ops --args '{"path": "test.txt", "new_str": "hello world"}'
dispatch:fs_ops ok →
{ "status": "success", "generation": 1 }

2. UNIX Domain Socket IPC

When the kernel is booted, it listens on .ostk/ostk.sock. You can write raw JSON-RPC payloads directly to this socket using netcat.

TERMINAL
$ echo '{"jsonrpc":"2.0","method":"read","params":{"path":"README.md","limit":100},"id":42}' | nc -U .ostk/ostk.sock
{"jsonrpc":"2.0","result":{"text":"# ostk-site..."},"id":42}

3. The Live Kernel Log

Every processed envelope registers in the active daemon journal log. You can follow this stream to see live calls, latency, and returned results in real time.

TERMINAL
$ tail -f .ostk/journal.jsonl
{"seq":84,"timestamp":"2026-05-22T21:34:37Z","verb":"read","args":{"path":"v2/package.json"},"signer":"T0"}

Interactive Command & ABI Explorer

Use the explorer below to search all 66 core CLI commands and ABI verbs. Find option flags, discover sandbox boundaries, and generate valid JSON-RPC request structures.

>_
Showing 66 of 66 commands TIP: Click a command header to expand parameters and JSON-RPC equivalents
[+] ostk arrive
SYSTEM ABI
[+] ostk bash
SYSTEM ABI
[+] ostk context-evict
SYSTEM ABI
[+] ostk context-load
SYSTEM ABI
[+] ostk context-pages
SYSTEM ABI
[+] ostk context-pin
SYSTEM ABI
[+] ostk context-release
SYSTEM ABI
[+] ostk context-restore
SYSTEM ABI
[+] ostk context-store
SYSTEM ABI
[+] ostk dispatch
SYSTEM ABI
[+] ostk fs-ops
SYSTEM ABI
[+] ostk handoff
SYSTEM ABI
[+] ostk help
SYSTEM ABI
[+] ostk interact
SYSTEM ABI
[+] ostk lock
SYSTEM ABI
[+] ostk note
SYSTEM ABI
[+] ostk read
SYSTEM ABI
[+] ostk search
SYSTEM ABI
[+] ostk session
SYSTEM ABI
[+] ostk session-history
SYSTEM ABI
[+] ostk spawn
SYSTEM ABI
[+] ostk tack
SYSTEM ABI
[+] ostk verb-help
SYSTEM ABI
[+] ostk verb-load
SYSTEM ABI
[+] ostk web-links
SYSTEM ABI
[+] ostk web-read
SYSTEM ABI
[+] ostk web-status
SYSTEM ABI
[+] ostk tui
DAILY WORK
[+] ostk show
DAILY WORK
[+] ostk trace
DAILY WORK
[+] ostk decide
DAILY WORK
[+] ostk commit
DAILY WORK
[+] ostk should
DAILY WORK
[+] ostk work
WORK PIPELINE
[+] ostk trust
IDENTITY & SECURITY
[+] ostk secret
IDENTITY & SECURITY
[+] ostk grant
IDENTITY & SECURITY
[+] ostk recovery
RECOVERY & FLEET
[+] ostk fleet
RECOVERY & FLEET
[+] ostk ps
RECOVERY & FLEET
[+] ostk pstree
RECOVERY & FLEET
[+] ostk kill
RECOVERY & FLEET
[+] ostk pkill
RECOVERY & FLEET
[+] ostk attach
RECOVERY & FLEET
[+] ostk run
RECOVERY & FLEET
[+] ostk agentfile
DOCUMENTATION & SPECS
[+] ostk doc
DOCUMENTATION & SPECS
[+] ostk serve
INFRASTRUCTURE
[+] ostk vfs
INFRASTRUCTURE
[+] ostk driver
INFRASTRUCTURE
[+] ostk bail
INFRASTRUCTURE
[+] ostk mlx
INFRASTRUCTURE
[+] ostk machined
INFRASTRUCTURE
[+] ostk inspect
DIAGNOSTICS
[+] ostk profile
DIAGNOSTICS
[+] ostk validate
DIAGNOSTICS
[+] ostk bench
DIAGNOSTICS
[+] ostk boot
SYSTEM SETUP
[+] ostk init
SYSTEM SETUP
[+] ostk hook
SYSTEM SETUP
[+] ostk completions
SYSTEM SETUP
[+] ostk mem-fault-recall
OTHER
[+] ostk recall
OTHER
[+] ostk recall-outline
OTHER
[+] ostk recall-search
OTHER
[+] ostk seal
OTHER