Oko/Docs

Command reference

oko api status

Reads the native API version, broker protocol, process identity and executable of the running Oko service, and refuses unless the service speaks this build's native API and PTY broker protocol.

Invocation#

Command
oko api status [--socket PATH]

Inputs and options#

  • --socket selects an existing broker socket, such as the one an isolated `oko serve --socket PATH` binds. Otherwise the shared broker declaration and OKO_BROKER_SOCKET select it.

Output and state effect#

  • Prints the service's JSON response: api_version, broker_version, pid and executable. It does not start, install or restart a service. Desktop uses the same resident API directly, without a CLI subprocess.

Refusals and safe exits#

  • An unreachable socket reports “Oko's PTY broker at <socket> is not answering: <error>; it runs inside the Oko service (`oko serve`)”. A mismatched api_version reports “Oko at <socket> answered native API version <n>; this client requires <m>”. A service speaking another broker protocol reports “Oko at <socket> speaks PTY broker protocol <n>, not <m>; the Oko service (<unit>) serves this build's broker after it restarts with this build”. An executable on PATH is not proof that its service supports this API.

CLI reference#