plccheck CLI

Use npx plccheck for Siemens PLC diagnostics, tests, coverage, transpilation, and automation.

plccheck is the command-line tool for checking, testing, and exporting Siemens PLC projects from a terminal or automation workflow.

Use it with npx:

npx plccheck check ./my-plc-project

The CLI is useful when you want the same PLC feedback outside the VS Code UI: local terminal checks, CI jobs, scripted validation, or LLM/agent workflows that need a reliable command to inspect a Siemens project.

Project Layout

plccheck works best when each PLC project has a .plc.json file at its root. The PLC root defines the symbol and type scope for files below it.

{
  "name": "PackingLine PLC",
  "cpuFamily": "S7-1500",
  "libraries": [
    "../shared_types"
  ]
}

cpuFamily is optional. Set it to S7-1200, S7-1200 G2, S7-1500 or S7-300/400 to enable checks that depend on the CPU, such as the time_type template TIA requires on IEC timer boxes for S7-1500. tia export writes it when it can tell the CPU family.

Supported project files include SCL / Structured Text source, S7DCL exports, S7RES resources, data blocks, UDTs, AWL files, PLC tag-table XML, the interfaces of SimaticML XML block exports, and .scltest test files.

TIA exports preserve project-library instances in the same shape as TIA VCI exports: library-owned PLC objects become .liblink placeholders in the PLC folder, while the shared library definition is written once under a sibling Types folder with .libinfo and .libint sidecars, plus a .meta.json comparison baseline (see Project-library types). plccheck resolves those placeholders through project-library discovery, separate from custom library paths listed in .plc.json, without duplicating library code in every PLC.

Quick Commands

Task Command
Check a PLC project npx plccheck check ./my-plc-project
Run PLC tests npx plccheck test ./my-plc-project
Run one test subset npx plccheck test ./my-plc-project --filter motor
Write coverage artifacts npx plccheck test ./my-plc-project --coverage-json coverage.json --coverage-lcov lcov.info
Stream machine-readable test events npx plccheck test ./my-plc-project --events-json
Transpile S7DCL FBD/LAD to SCL npx plccheck transpile --to scl ./Program.s7dcl
Draw networks, values or a diff npx plccheck render ./Program.s7dcl --base HEAD --out changes.html
Build a PLC runtime executable npx plccheck compile --out plc-run.exe ./my-plc-project
Build and run a PLC runtime npx plccheck run ./my-plc-project -- --opcua-port 4849
Export PLC software npx plccheck tia export software Demo.ap21 --out exported --plc PLC_1
Export project hardware npx plccheck tia export hardware Demo.ap21 --out exported
Export Safety Administration settings npx plccheck tia export safety Demo.ap21 --out exported
Start an LSP server npx plccheck serve

Check PLC Source

Use check to parse and type-check a file, folder, or PLC root.

npx plccheck check ./my-plc-project

The command exits non-zero when it finds errors. This makes it suitable for CI and for agent workflows where a tool needs a clear success/failure signal.

A system instruction can type-check even when TIA needs another object to import its standalone instance DB. For example, B1-3's S7DCL declares DATA_BLOCK "WRREC_DB" : WRREC. TIA V21 looks up a block named WRREC in the destination PLC. The original DB's SimaticML export also identifies its backing block (WRREC_SFB), system library element (WRREC) and version (1.1). On a fresh CPU 1511-1 PN with firmware 2.8, the SimaticML export imported successfully. Compiling a WRREC multi-instance on that CPU still left the standalone S7DCL import with a missing dependency. Use the original DB's SimaticML export to recreate this instance. check can resolve the instruction from source, but only TIA can look up the object in the destination PLC.

Useful flags:

Flag Description
--jobs N Controls parallel checking. Defaults to the available Go runtime parallelism.
--show-warnings Prints warning diagnostics as well as errors.

Example:

npx plccheck check --show-warnings --jobs 4 ./my-plc-project

Run PLC Tests

Use test to run .scltest suites for a PLC root.

npx plccheck test ./my-plc-project

The test runtime is designed for fast iteration. It generates a runtime for the PLC project, runs selected test cases, and resets generated runtime state quickly between tests.

Useful flags:

Flag Description
--filter <text> Runs only test cases whose names contain the filter text.
--list-cases Prints selected test cases before running.
--parallel N Controls parallel execution of generated test cases.
--module <path> Sets the generated Go module path.
--events-json Streams machine-readable test events to stdout.
--entry-ob <name> Sets the whole-program entry OB when the default OB1 is not correct.

Examples:

npx plccheck test ./my-plc-project --filter startup
npx plccheck test ./my-plc-project --events-json
npx plccheck test ./my-plc-project --entry-ob Main

Generate Coverage

Use coverage flags with test to write reports.

npx plccheck test ./my-plc-project --coverage-json coverage.json --coverage-lcov lcov.info

Coverage artifacts include statement, function, and branch data where runtime data is available.

Artifact Use
--coverage-json <file> Structured coverage data for custom tools, CI summaries, and LLM/agent analysis.
--coverage-lcov <file> LCOV tracefile for coverage viewers such as Coverage Gutters.

If you use Coverage Gutters, lcov.info is a convenient default filename:

npx plccheck test ./my-plc-project --coverage-json coverage.json --coverage-lcov lcov.info

Compile and Run PLC Runtime

Use compile to generate a temporary Go runtime and build a standalone executable:

npx plccheck compile --out plc-run.exe ./my-plc-project

Use run to build and launch the runtime in one step. Runtime arguments go after --:

npx plccheck run ./my-plc-project -- --opcua-port 4849 --scan-period 24h

compile and run accept the same generator flags:

Flag Description
--out <exe> Executable path. Required for compile.
--workdir <dir> Directory for the generated Go sources. Defaults to a temporary directory.
--module <path> Generated Go module path.
--entry-ob <name> Entry OB when the default OB1 is not correct.
--source-maps Emits line directives that map generated Go back to PLC source.
--go-test Runs go test ./... on the generated sources before building.
--allow-unresolved Builds although some references name nothing in the sources. Each one then reads as the default value of its type.

compile and run fail when the program references something the sources do not declare, and list each reference with the block that uses it. Hardware identifiers and the blocks TIA generates, such as the instance DB of a main safety block, only exist in the TIA project. plccheck tia export software writes them next to the sources (system-constants.yml and the generated DBs); tia import does not. test prints the same list and runs the tests anyway.

The runtime itself takes these arguments:

Flag Description
--scan-period <duration> Delay between scan cycles. 0 runs as fast as possible.
--cycles N / --duration <duration> Runs headless for N scans or for a fixed time, then exits.
--headless Runs without the terminal view until interrupted.
--dump-once Runs one scan, prints one frame and exits.
--opcua-port N OPC UA server port. Defaults to 4840; 0 disables it.
--s7-listen <addr> Starts a read-only S7CommPlus server, for example 127.0.0.1:102.

Transpile S7DCL to SCL

Use transpile to inspect generated SCL for TIA Portal exports.

npx plccheck transpile --to scl ./Program.s7dcl

The source format is determined from the file extension. A single .s7dcl file may contain SCL, FBD, and LAD networks; all supported networks are emitted in source order. This is useful when reviewing graphical exports in text-based workflows or when an agent needs to reason about the equivalent SCL.

Render FBD and LAD Diagrams

Use render to show the FBD and LAD networks of a block outside VS Code, for example to show a reviewer a change or an operator why a motor does not start.

npx plccheck render ./Program.s7dcl --network 9,10 --out networks.html
npx plccheck render ./Program.s7dcl --values values.json --why "#startPermissive" --out interlock.html
npx plccheck render ./Program.s7dcl --base HEAD --out changes.png

The block is analysed in its PLC scope like the editor does, and the diagrams are drawn by the graphical editor's renderer. SCL networks are shown as source. The command prints a text explanation, and --out writes:

  • .html: an interactive page that opens in any browser. Click a coil, box or wire to see why it has its value, and switch the sides of a diff.
  • .png: a screenshot of that page. It needs Chrome, Chromium or Edge, found automatically or set with --browser or PLCCHECK_BROWSER.
  • .json: the details also printed by --json.

With values, wires and blocks are coloured TRUE or FALSE, the values are shown at their operands, and the text lists the inputs that decide each coil and call input. The colours are worked out from the supplied values, not traced from the CPU, so a coil written in an earlier network needs its own value. A values file is either a flat object or has instance, label and values:

{
  "label": "operator report, HPU alarm",
  "values": {
    "\"hpu_DB\".hpuReady": false,
    "#stopping": false,
    "#group.availableCount": 12
  }
}

Keys are source expressions (#local, "DB".member) or absolute PLC paths. Paths of function block locals resolve through --instance, which is chosen automatically when the block has one instance. Durations are written like in source ("T#5S"), and 64-bit values as strings. --why traces one result back to the operands that decide it: a coil operand, a call input such as "Motor_DB".XE, a wire such as wire#w1, or Network 4. It also works without values, listing what the result depends on. The page highlights the deciding path, and follows it into the coils of other shown networks that write the deciding operands.

--base <rev> compares with a git revision of the same file and --base-file <file> with another export. Changed networks are shown before and after with added, removed and modified elements coloured, and the text lists pin-level changes. --all includes unchanged networks. Changes outside networks, such as declarations and .s7res texts, are reported but not drawn.

Flag Description
--network <list> Network numbers such as 3,5-7. Defaults to all networks, or the networks of the --why targets. In diffs, numbers in the new version.
--values <file> / --value key=value Operand values. - reads the file from stdin. --value can be repeated and overrides the file.
--instance <db> / --values-label <text> Instance for FB locals, and where the values come from (shown above the diagrams).
--why <target> Result to explain. Can be repeated.
--base <rev> / --base-file <file> Draw a graphical diff.
--out <file> .html, .png or .json. Can be repeated.
--theme light|dark Colours. HTML follows the browser by default, PNG is light.
--scale <n> PNG pixels per CSS pixel. Defaults to 2.
--language <culture> Culture for network titles and comments. Defaults to en-US.
--json Print one JSON object: networks, traces, operands, unused values, diff rows and written files.

Emit Source Summaries

Use emit when you need a derived representation of a source file.

npx plccheck emit --target scl-summary ./Program.scl

Use this for inspection and automation tasks where a compact summary is easier to consume than the original export.

LSP Server Mode

serve starts the language server over stdio:

npx plccheck serve

Most users do not need to call this directly. It is intended for editor integrations or tools that can speak the Language Server Protocol.

TIA Portal Openness

On Windows x64 machines with TIA Portal Openness V21.1 or V21, tia commands attach to a running TIA project or open an explicit .ap21/.ap21_1 or .zap21/.zap21_1 path. For an already open project, --project can be the exact project name shown by tia list --json instead of the full project path.

With several TIA versions installed, plccheck uses the newest one. Set TIA_OPENNESS_API_DIR to another PublicAPI\<version>\net48 folder to pick one. V21.1 opens V21 projects, but once it changes one it saves it as a V21.1 project, which V21 can no longer open. TIA renames the project file to .ap21_1 when it does that.

tia export software <project> uses the direct archive reader by default and falls back to TIA Openness when direct export fails or cannot produce every artifact. Pass an existing .zap21/.ap21 path for a TIA-free direct export, or pass the exact name of an open project. For an open project, Openness saves the project and copies its persistence files to a stable temporary snapshot before the direct reader runs. --engine direct and --engine openness force one software engine without fallback; --engine auto is the default. --live saves an open project before the direct snapshot is taken. --allow-partial (direct engine only) keeps successfully rendered objects and reports the ones that could not be exported; it cannot be combined with --delete-stale.

tia export hardware <project> always uses TIA Openness and exports the whole project. Software and hardware are separate operations so ordinary source export does not pay the hardware-export startup cost.

tia upgrade <project> --out <dir> upgrades a project or archive from an older TIA Portal version (.ap17, .zap15_1 and so on) to the installed version. The source is left as it is. The upgraded project is written to a folder under <dir>, named the way TIA names it (Demo_V21). Pass a .zap21 path as --out to get an archive instead. TIA refuses the upgrade when the project needs products that are not installed, such as a GSD file or an add-on. Other tia commands that fail to open an older project point to tia upgrade.

tia export safety <project> writes the Safety Administration settings of each fail-safe PLC to <out>/<PLC>/safety-administration.yml. It always uses TIA Openness and needs STEP 7 Safety, see Safety Administration export.

npx plccheck tia host status --json
npx plccheck tia host install
npx plccheck tia rpc --filesystem-root exported
npx plccheck tia list --json
npx plccheck tia compile --project "Demo Project" --plc PLC_1 --json
npx plccheck tia export software Demo.ap21 --out exported --plc PLC_1 --delete-stale
npx plccheck tia export software "Demo Project" --out exported --engine auto
npx plccheck tia export software Demo.ap21 --out exported --engine openness
npx plccheck tia export hardware Demo.ap21 --out exported
npx plccheck tia export safety Demo.ap21 --out exported --plc PLC_1
npx plccheck tia import --project Demo.ap21 --root exported "exported/PLC_1/Program blocks/Main.scl" --create
npx plccheck tia import --project Demo.ap21 --root exported "exported/PLC_1/Program blocks/Main.scl" --overwrite-remote-changes
npx plccheck tia import --project Demo.ap21 --root exported --skip-library-instances "exported/PLC_1"
npx plccheck tia import --project Demo.ap21 --root exported "exported/PLC_1/Program blocks"
npx plccheck tia import --project Demo.ap21 --root exported --library-types --dry-run exported/Types
npx plccheck tia repair-library-dependencies --project Demo.ap21 --plc PLC_1 --owner CA
npx plccheck tia compile --project Demo.ap21 --plc PLC_1 --json
npx plccheck tia online --project Demo.ap21 --plc PLC_1
npx plccheck tia online --project Demo.ap21 --plc PLC_1 --online-auth-type ProjectUser --online-user engineer --online-password-env TIA_PROJECT_PASSWORD
npx plccheck tia offline --project Demo.ap21 --plc PLC_1
npx plccheck tia snapshot --project Demo.ap21 --plc PLC_1 --json
npx plccheck tia download --project Demo.ap21 --plc PLC_1 --json
npx plccheck tia upgrade Demo.zap17 --out upgraded
npx plccheck tia upgrade Demo.zap17 --out Demo.zap21
npx plccheck tia languages --project "Demo Project"
npx plccheck tia languages --project "Demo Project" --activate nb-NO --allow-project-writes

tia languages lists the languages of an open project by culture name and, with --allow-project-writes, activates languages (--activate, repeatable) and sets the editing (--editing) and reference (--reference) language. It attaches like the hmi commands, so the project must be open in TIA Portal, and it does not save the project. See Languages.

Without --json, project-scoped tia list prints a PLC summary table with block/type counts and example commands using the listed PLC names. Human tia export software output prints each exported block and data type path relative to the export directory with its real file extension, then finishes with exported/failed block counts instead of dumping the structured file list. Use --json when scripts need the full structured result.

If tia list --json shows a running TIA process with projectPath but a project command reports that TIA Openness did not expose the project, the running Portal can see the file path but cannot provide a usable Openness Project. A common cause is that the machine is missing a TIA product or add-on required by that project. Close that TIA Portal instance and rerun a verification export with plccheck tia export software <path> --out <dir> --engine openness to surface TIA's native open error.

export writes each PLC under its own PLC-name root with a .plc.json file and preserves Program blocks / PLC data types folders. Software-unit objects live below Software units/<unit>/ with the same folder structure. It also writes every TIA system constant for that PLC to system-constants.yml; this includes hardware IDs as well as the other constants exposed by the PLC's tag tables. PLC tag tables are exported as XML that the extension can edit; see PLC tag tables.

Software export through Openness accepts three optional item filters as environment variables: PLCCHECK_TIA_EXPORT_BLOCK_NAME, PLCCHECK_TIA_EXPORT_BLOCK_LANGUAGE, and PLCCHECK_TIA_EXPORT_BLOCK_PATH. Each holds one or more ;-separated values that must match the block name, programming language, or TIA folder path exactly (case-insensitive). PLCCHECK_TIA_SKIP_TYPE_EXPORT=1 skips PLC data types and project-library definitions. These filters apply to --engine openness.

The VS Code extension uses --engine direct for linked PLC exports and full temporary comparison snapshots. Direct exports write the TIA fingerprint into .meta.json; the source, resource, and format baselines next to it are the fallback when TIA has no matching fingerprint (see Import validation). Diff previews reuse the accepted comparison snapshot; replacement and post-import refresh obtain a fresh export. Editor exports enable --allow-partial, keeping successfully rendered objects usable while reporting unavailable objects and suppressing stale-file cleanup. Linked projects compare automatically when opened and after saved storage changes; background snapshots use --saved-only to preserve unsaved TIA edits. See Direct export and comparison for details. The CLI's tia diff continues to default to --engine openness, which assesses each file the way import does; pass --engine direct to compare a fresh direct export instead.

plccheck tia export hardware refreshes the canonical full-project CAx document at <out>/hardware.aml and parses that document into an in-memory hardware model. Readable, deterministic views of that model are written to <out>/hardware/project.yml, <out>/hardware/networks.yml, and one file per device under <out>/hardware/devices/. The device views preserve nested AML attributes, including interface channel metadata and module input/output start addresses. The canonical AML and its derived YAML always describe the complete project. Generated YAML files have no export timestamp and begin with an autogenerated warning. Hardware export and YAML generation use staged replacement, so an export or rendering failure preserves the previous complete artifact and exits non-zero. When TIA skips devices it cannot export, such as a classic HMI panel without a TypeIdentifier, it reports the CAx export as failed but still writes the rest of the project. plccheck then writes that AML and its views and reports every CAx error as a warning. A CAx call is stopped after five minutes by default; set PLCCHECK_TIA_CAX_EXPORT_TIMEOUT_SECONDS to a positive number to change that watchdog.

With the Openness engine, SCL blocks are emitted through TIA external-source generation as .scl; PLC types, DBs, FBD, and LAD blocks are emitted through TIA document export first so the main editable output is .s7dcl. The export job runs inside one TIA exclusive-access scope across all selected PLCs, and the scope text is updated for each block or type with item progress, percentage, and ETA so long document exports show continuous TIA progress. Each item is staged in a clean temporary folder before replacing that item's previous files, so re-exporting into the same output directory does not require deleting it first. import accepts one or more source files or folders, expands folders recursively, infers the target PLC from paths under Program blocks / PLC data types, and requires --create before creating missing TIA folders or blocks. Supported direct import sources are .scl, .s7dcl, .db, .udt, .xml, .awl, .lad, and .fbd; pass the owning source file instead of .s7res resource sidecars or .meta.json metadata sidecars. By default, import skips unchanged local files, skips local files whose TIA object changed while the local source stayed unchanged, and rejects files changed both locally and in TIA since the last metadata refresh. Pass --overwrite to import when both sides changed, or --overwrite-remote-changes to import when only the TIA object changed. When an import would overwrite an existing project-library type instance or one of its project-library dependencies, it fails by default because plain document/source import detaches that object from its library type; pass --skip-library-instances to leave those library-owned targets unchanged and continue importing the rest, or pass --allow-library-instance-overwrite only for an intentional mutation run. repair-library-dependencies is the safe repair path for that failure class: it recreates the named library instance's project-local dependency objects from the project library. With --library-types, edited documents under <root>/Types are imported as new released versions of their project-library types and every PLC is updated to them, see Importing an edited type. Without it a Types document is refused and folder imports leave Types alone. --library-types can not be combined with --skip-library-instances or --allow-library-instance-overwrite. compile, online, offline, snapshot, and download operate on all PLCs unless --plc narrows the scope; snapshot skips safety DBs and DBs without retained members while reporting skip/error data. download compiles first, uses the target configured in the TIA project, reports the selected target in JSON, and falls back to software-only changes when Siemens Openness rejects a full load because of fail-safe data. The result then warns that only SoftwareOnlyChanges was loaded and gives TIA's reason (rejectedOptions and rejectedReason of the target). It tries the PG/PC interfaces TIA lists for the PLC one after another, those that see an accessible device first. When no interface works, or TIA ends the download with errors, the command exits with 1 and lists each interface with what was tried and why it failed or was skipped: TIA's error, the devices the interface sees, the download questions TIA asked and the answers given. With --json the same list is downloads[].candidates of the result event.

Device actions automatically accept non-secret TLS/online authentication modes when TIA exposes them, such as trusted TLS, anonymous user, single sign-on, or no user. If the PLC requires explicit credentials, pass --online-auth-type ProjectUser|GlobalUser|PasswordOnly, --online-user <name> where applicable, and --online-password-env <env> so the password comes from an environment variable instead of the process command line. The bridge also reads PLCCHECK_TIA_ONLINE_USER_TYPE or PLCCHECK_TIA_ONLINE_AUTH_TYPE, PLCCHECK_TIA_ONLINE_USER, and PLCCHECK_TIA_ONLINE_PASSWORD when flags are omitted. Projects opened by the bridge start TIA Portal without a user interface; set PLCCHECK_TIA_PORTAL_MODE=WithUserInterface to show it.

Packaged Windows x64 builds install their bridge under %ProgramFiles%\plccheck\tia-openness-bridge\bundles\<sha256>, with a unique executable name and Siemens AllowList entry. Different versions and builds coexist; identical npm and extension bundles reuse the same installation. tia host status|install|upgrade|uninstall manages only the invoking CLI's bundle. Foreground TIA commands automatically install or repair it when needed, which can request Windows administrator approval and ensure the invoking user belongs to the local Siemens TIA Openness group. Set PLCCHECK_TIA_HOST_SETUP=0 for background reads that must not install, repair, or elevate. Old bundles and the pre-2.17.2 shared host remain available to older clients. See managed host installation. tia trust --json inspects trust, and PLCCHECK_TIA_BRIDGE remains an unmanaged development/test override.

tia rpc keeps the bridge process, TIA Portal connection, selected project session, and object handles alive for the lifetime of stdin. It speaks newline-delimited JSON-RPC 2.0, performs initialization internally, and exposes bounded object traversal, reflection discovery/invocation, event subscriptions, and audit reads. Startup flags opt into project writes, device actions, private APIs, and tagged filesystem roots. Through RPC, operation.run with action export writes the PLC software and system-constant artifacts, while action export-hardware writes the canonical AML through the active session. Use plccheck tia export hardware when the derived hardware YAML views are also required. See TIA Openness RPC host for the protocol, policy, methods, handle lifecycle, and examples.

WinCC Unified HMI

hmi inspects and edits WinCC Unified screens in an open TIA project, compiles and saves them, and deploys them to a local Unified simulation:

npx plccheck hmi list --project "Demo Project"
npx plccheck hmi <list|inspect|set|create|delete|export|script-read|script-write|compile|save|export-screens|apply-screen|runtime-languages|deploy|runtime|diagnostics|tags|assert-tags|network|certificates> [options]

hmi runtime-languages --target <t> [--add <culture>...] lists the target's runtime languages in order, the first being the default, and enables more. hmi export-screens --target <t> [--screen <name>...] --out <dir> writes one JSON file per screen plus a manifest, read-only. hmi apply-screen --file <screen.hmi.json> [--target <t>] [--create-screen] [--delete-missing] [--reorder] applies one of those files in a single request and reports each item as created, updated, unchanged or failed. Edits, screen apply and compilation require --allow-project-writes. Deployment and starting or stopping the simulation require --allow-runtime-control. --timeout limits one operation; the default is 2 minutes, or 10 minutes for apply-screen and deploy.

mcp is plccheck's stdio MCP server for coding agents. It serves these operations and the TIA project languages as tools, and plc_render_block and plc_render_diff, which return the render text to the agent and show the diagrams to the user as an MCP App. Hosts with MCP Apps, such as Claude Desktop, ChatGPT, the Codex app, VS Code and T3 Code with Codex, show the interactive page inline. Other hosts get the text, and image: "png" adds a screenshot for the agent to look at:

npx plccheck mcp --project "Demo Project" --allow-project-writes

See WinCC Unified agent commands for every operation, its request format and the current limits.

Agent-Friendly Usage

For LLM coding agents and search tools, these are the most useful commands:

npx plccheck check ./my-plc-project
npx plccheck test ./my-plc-project
npx plccheck test ./my-plc-project --coverage-json coverage.json --coverage-lcov lcov.info
npx plccheck transpile --to scl ./Program.s7dcl
npx plccheck render ./Program.s7dcl --values values.json --why "#run" --out why.html
npx plccheck tia host status --json
npx plccheck tia rpc --filesystem-root exported
npx plccheck tia export software Demo.ap21 --out exported --json

Recommended agent workflow:

  1. Locate the PLC root containing .plc.json.
  2. Run npx plccheck check <plc-root> before changing behavior.
  3. Add or update .scltest files for the target block.
  4. Run npx plccheck test <plc-root>.
  5. Use --coverage-json when coverage or branch visibility matters.
  6. Use transpile --to scl when reviewing S7DCL FBD/LAD exports.
  7. Use render to show a user a network, an interlock with values, or a graphical diff.

The CLI returns process exit codes that automation can trust: successful checks/tests exit with 0; diagnostics, failing tests, invalid paths, or invalid options exit non-zero.