monolex-cli is the automation surface for a running Monolex Tauri desktop
app. It talks to the app’s local control boundary; it is not a substitute for
starting the desktop app, the headless server, or the PTY daemon.
Public OpenCLIs metadata: monolex-cli 0.2.1, registry build
2026-04-10-065301. The CDN artifact URL currently names build
2026-04-08-205635, and the published payload self-identifies as
monolex-cli 0.2.0. The command inventory below was verified against that
exact payload; these three release identities are not claimed to agree. The
installed macOS binary is byte-identical to the CDN payload despite its
different OpenCLIs build directory.
Registry ownership: the public monolex-cli row points its canonical
docs_url to this page, its product homepage to https://monolex.ai, and its
relationships to Monopty, Monosystem, Monolex Headless, and OpenCLIs. Repository
ownership remains monolex/monolex; no public source URL is advertised while
that repository is private.
Quick Start
--json is a
global machine-readable output switch and is also shown by every subcommand.
The parser exposes 19 operational commands plus Clap’s generated help.
Release and Transport Identity
The release contains
darwin-aarch64, linux-x86_64, linux-aarch64, and
windows-x86_64 artifacts. There is no published Intel macOS or Windows ARM64
artifact in this release.
On Unix, the CLI discovers a live
~/.monolex/runtime/sockets/app/control-app-<PID>.sock; dead-PID socket files
are removed during discovery. On Windows, it reads a control-app-<PID>.pid
marker and connects to the monolex-control-app-<PID> named pipe. Version
0.2.0 has no --socket override and selects the first live discovered app
endpoint.
Output Contract
With--json, a successful app reply stays wrapped as
{"ok":true,"data":...}. Without it, most commands print only data;
get-answer prints only extracted content. Connection, parse, and other
transport failures exit non-zero. In JSON mode those transport failures are
written to stderr as {"ok":false,"error":...}, so consumers must check both
the exit status and output channel.
Complete Command Reference
App, tabs, and terminal I/O
Projects, files, and gateway state
Remote desktop sessions
OpenCLIs tools
CLI Parser vs App Control Protocol
The shipped CLI and the current desktop app share a newline-delimited JSON socket, but their names are not a one-to-one catalog:command-list is generated by the app, not by Clap. It currently includes 28
grouped entries, while the control request enum has 29 variants and the CLI
has 19 operational commands. In particular, app dispatch implements
remote-auto-connect, but the current grouped command-list omits it. Use
root --help for the binary parser, command-list for current app access
toggles, and source/gateway proof for remote exposure; none substitutes for
the others.
Source-head Agent Browser wire family
Repository commit7ca48fc1ba3e3266074a58c402b51955aa172b70
adds six app-control requests. They steer the same visible browser session the
user is watching; they do not create a private headless browser:
This family is compiled only with the app’s
web feature. A Base build returns
browser commands require the web plugin (app-monolex --features web) for all
six requests rather than an empty or synthetic success. The published
monolex-cli 0.2.0 payload has no parser verbs for constructing these messages,
so the table documents the current app protocol, not six newly released CLI
commands.
All local socket requests except command-list honor the app’s UI-managed
disabled-command set. The Tauri control_socket_query bridge applies the same
gate. Its current executable query map is project-list, tab-list, status,
gateway-info, command-list, and start-headless. The Cloudflare
control_query_v1 allowlist contains additional names, but an allowlisted name
still returns unknown_query unless this Tauri map implements it. A local CLI
command is therefore not automatically web-callable. The six Agent Browser
wire requests are not in this query map either.
Automation Pattern
tab-new returns an event-emission acknowledgement before the frontend creates
the PTY, so poll tab-list and compute/select the newly observed id. Creating a
tab, observing idle, and extracting an answer are three different proof layers.
An idle terminal may still contain a prompt for more input, and a successful
write does not prove that an AI CLI completed.