cli reference

Routed CLI overview, with local schemas authoritative

This overview covers source-backed gateway families, not every installed subcommand. Use 2ot help, 2ot --list --json and 2ot --mcp-dump-schema for exact flags and channel-specific exposure.

18 of 18 command surfaces
2ot check --fastcompiler

Fast diagnostics

Run compiler diagnostics without starting a vendor IDE where supported.

2ot test prepareutility

Test preparation

Prepare test inputs through a reviewed CLI-only route.

2ot transpile ...compiler

Transpile

Enter compiler conversion routes; use installed help for exact flags.

2ot build ...workspace

Vendor build

Target-bound build. Consequential routes require transaction authorization.

2ot lspprotocol

Language server

Provide compiler-backed language intelligence to compatible clients.

2ot mcpprotocol

Local MCP transport

Expose reviewed MCP-eligible operations; raw persistent mutation is denied.

2ot probes ...utility

Probes

Access supported probes; inspect local help and policy first.

2ot run ...utility

Run tooling

Dispatch reviewed run routes subject to operation and effect policy.

2ot tests ...utility

Test tooling

Access installed test routes where supported.

2ot capabilities <tia|twincat|codesys>discovery

Vendor capability inventory

Report CLI-only registry metadata without live vendor probing.

2ot rusty ...vendor

RuSTy

Reach registered RuSTy compiler routes.

2ot tia ...vendor

Siemens TIA Portal

Reach reviewed Siemens operations on a suitably licensed host.

2ot codesys ...vendor

CODESYS

Reach registered CODESYS operations where supported.

2ot twincat ...vendor

Beckhoff TwinCAT

Reach registered TwinCAT operations where supported.

2ot tx ...workspace

Transaction lifecycle

Plan, review, authorize, execute and retrieve receipts through the protected service.

2ot --list --jsondiscovery

Installed CLI routes

Enumerate local CLI commands; MCP exposure may differ.

2ot --mcp-dump-schemadiscovery

MCP tool schema

Describe reviewed MCP-eligible tools on this installation.

2ot help <command> [subcommand]discovery

Local route help

Inspect installed subcommands and arguments rather than guessing ellipses.

source of truth

Let the local executable describe itself

Website discovery is informational. CLI and MCP share reviewed contract definitions but do not expose identical sets: some commands are CLI-only. The installed executable and its policy remain authoritative.

Agents & MCP →

Transaction CLI: reviewed exit codes

These are the protected 2ot tx exit meanings documented by the transaction service, not a claim that every vendor child uses the same codes. JSON transaction responses expose fields including schema_version, status, code, operation_id and recommended_action.

0
Success
2
Invalid invocation or protocol
3
Authentication or approval rejected
4
Unknown operation or unsupported policy
5
Service unavailable before dispatch
6
Uncertain response after dispatch: inspect status/receipt; no blind retry
7
Conflict, recovery or indeterminate state
8
Verification failed: inspect receipt and rollback
9
Internal failure