cds-text-sync CLI
A CODESYS project as text files for Git and LLM agents: export, build, Structured Text analysis and tests in simulation
- 106 ★ on the repository
- Last commit
- MIT
Broad access
Why this level
- The agent drives the open IDE: it builds the project, downloads it to the PLC and reads controller variables
- The `cts verify --with-test` command writes data to the PLC, and the installer runs a PowerShell script from the internet
Install
Manual install
irm https://raw.githubusercontent.com/ArthurkaX/cds-text-sync/main/irm/setup.ps1 | iexThe PowerShell command from the Quick start section installs `cts` and the CODESYS menu entry. Read the script before running it.
Access and checks
How we reviewBroad accessThe tool can change data, run commands or handle secrets.
- The agent drives the open IDE: it builds the project, downloads it to the PLC and reads controller variables
- The `cts verify --with-test` command writes data to the PLC, and the installer runs a PowerShell script from the internet
This is third-party code. Review the repository files before installing.
What it does
cds-text-sync turns a binary CODESYS project into a text folder: each `POU`, `GVL`, `DUT` and interface is a separate `.st` file, text lists are stored as `.csv`, and devices, tasks and visualizations stay as XML. The folder lives in Git, edits in it are reviewed in ordinary editors and go back into the project with `cts import`. If one object changed both in the IDE and on disk, a line-by-line compare window opens. The `cts` command is linked to an agent inside CODESYS, so an LLM agent exports the project, inspects it, builds the application, downloads it to the PLC and reads variables. The offline analyzer `cts analyze` checks `.st` files without the IDE and writes a SARIF report for CI, `cts verify` returns one verdict before a release, and `cts test` runs tests in simulation. The repository ships two skills: `cds-text-sync` with the operating rules and `cds-visu-svg` for visualization screens that are drawn as SVG and compiled into CODESYS.
Who it is for. For PLC programmers on CODESYS who keep a project in Git and want an agent to edit and check Structured Text code.
Good fit when
- A CODESYS project has to go into Git and changes are reviewed line by line in a pull request.
- An agent edits a function block in ST and builds the application right away in the open IDE.
- `cts verify` runs before a release: static analysis, SVG lint and the compiler give one verdict.
- A visualization screen is drawn in SVG and compiled with `cts visu from-svg` after the sketch is approved.
- Two people change one project on different branches, and conflicts are resolved per object.
- `.st` analysis runs in CI without an open IDE, and the report goes out as SARIF.
Not a fit when
- The work is not on Windows: `cts` and the in-IDE agent target Windows 10 or 11 and CODESYS V3.5 SP16 or newer.
- The controller runs a live installation: download and tests write to the PLC, and on production hardware without a separate test bench an agent should not run them.
- You need an official CODESYS product: the project is independent and not affiliated with CODESYS.
Example request
Export the CODESYS project to the sync folder, find errors in `.st` with `cts analyze` and fix the `FB_Motor` blockLimitations
It works only on Windows 10 and 11 with CODESYS V3.5 SP16 or newer, tested on SP16 Patch 9 x86 and SP22 x64, and needs Git. The agent inside CODESYS has to be started by hand on every IDE start, and until it runs `cts` does not see the environment. The installer is a PowerShell script from the repository, and it is better to download and read it before running. Version 4.0 does not take over folders of version 3.x; you can go back to 3.4.1 through the installer menu. The project is independent and not a CODESYS product. Licensed under MIT.
How to disable. The agent stops together with CODESYS, and without it `cts` does not see the project. The sync folder stays an ordinary Git repository that you can keep or delete like any folder. The installed files are described in the installation guide in `docs/install.md`.
FAQ
Which CODESYS versions are supported?
V3.5 SP16 and newer, tested on SP16 Patch 9 x86 and SP22 x64. Windows 10 or 11 and Git are required.
Where does the agent get the operating rules?
From the `cts guide workflow` command: the rules ship inside the package and match the installed `cts` version. The `cds-text-sync` skill only sends the agent to read them.
Can I check code without an open IDE?
Yes. The `cts analyze --workspace <folder>` command runs offline, and the `--sarif` flag saves a report for code scanning in CI.
What does `cts verify` do?
It runs every applicable check: static analysis, SVG lint and, if the IDE is open, the compiler. The output is one verdict and one exit code. The compiler touches the build state, and `--with-test` writes to the PLC.
How do two people work on one project?
Each clones the repository and works on a branch, and the owner reviews and merges the changes. The procedure is described in `docs/team.md`.
Discussion
No questions or reviews yet.
Related
CLI toolsMCP server for CODESYS V3.5: Claude reads and edits Structured Text, compiles with the real compiler and runs the simulation.
A library of agent skills for CAD, CAE and CAM: generate and edit models, export STEP, STL, 3MF, robot description files and mesh slicing to g-code
Duplicate code detector for 220+ languages with an MCP server for agents and a token-efficient report
The agent writes code, people decide, and gates are held by hooks in Claude Code, Codex, Cursor, OpenCode, Qwen Code and GigaCode
codesight maps a project in one run: routes, DB models, dependencies, env vars. It gives the map to an agent as files or through an MCP server
Ten software lifecycle skills for Claude Code: requirements, design, tests, adversarial review and release checks with hooks.
README in short
The description shows how to export a project to Git, keep it in sync with the IDE, find errors with the static analyzer and connect an LLM agent. Separate sections cover visualization screens from SVG, recording PLC variables during commissioning and running several IDEs at once.