CLI UX Philosophy

2 min read
Suggest an Edit

Because Lexum bridges the gap between infrastructure orchestration and application logic, its Command Line Interface (Lexum) cannot behave solely like a standard language compiler (e.g., rustc or gcc), nor can it act like a pure deployment tool (e.g., kubectl or terraform).

The Lexum CLI is built around Three Operational Modes:

When iterating locally, the CLI acts as an interactive build system. It provides blazing-fast type checking, syntax validation, and immediate feedback loops. Commands in this mode are designed for speed and human-readability. Errors are printed with rich structural context, showing exactly where a deterministic slice might fail.

When running in a headless pipeline or build server, the CLI radically shifts its output format. The Lexum-lint and Lexum verify commands strip away color formatting and emit strict JSON or machine-readable NDJSON logs. In this mode, the CLI focuses entirely on formal mathematical proofs (Idempotency Checks, Sandbox Constraints, Schema Completions) rather than compilation speed.

When interacting with a running Lexum Cluster, the CLI acts as a diagnostic probe. Because the language heavily utilizes snapshots, replay logs, and mailboxes, the CLI is equipped to query live domains, extract offline snapshots, and visually render the state of a Control Loop.

Strict Positional Determinism

In line with the language's core philosophies, the Lexum CLI avoids heavily overloaded flags. Arguments and parameters are positional and highly structured.

  • Anti-Pattern: Lexum run --fast -x node -v
  • Lexum Pattern: Lexum run node --profile=fast --verbose

There is no "magic" implicit configuration read from scattered environment variables. If a CLI command alters the compilation target, it requires an explicit flag.