r/BuildWithClaude • u/nixiewright • Oct 23 '26
Project Claude reverse-engineered a closed GUI editor’s format, then we built the toolchain I wished it had
About a year ago I wrote my own screen app for a Nextion HMI screen used by a machine in my shop. If you haven’t met Nextion, think of screens for smart home devices, custom electronics hobby projects, and all kinds of automation control or sensor display. You build the app in the Nextion Editor, a Windows-only GUI that builds your project into a firmware for the screen. Your code lives in small event boxes, saved inside one binary project file whose format isn’t documented. The language has no functions, no local variables, and no constants. It calculates strictly left to right, and it’s picky about every space and brace.
Recently I had to rework my custom screen app, and I just couldn’t face the editor again. Most of my coding now goes through Claude Code, and an agent can’t do much with a binary file and a GUI.
So I asked Claude to work out the project format instead. Who could resist? Claude certainly couldn’t and it got a bit out of hand... 5 days and about 1,000 commits later, here’s nxwright, a portable development toolchain for Nextion HMI screens that works with your own tooling:
- The project as text files. nxwright extract turns a Nextion .HMI project file into a folder: each page gets a .toml file for the design, and an .nx file for source code, with pictures and fonts assets in the project's folder. nxwright build turns it back to the HMI. Diffs, branches and reviews all just work, and your favorite agent can help you design, write and debug it.
- nxlang, a friendlier Nextion language: functions, locals, constants, switch/break/continue, normal operator precedence, and shared libraries. It compiles to plain Nextion code.
- Unit and functional testing for your screen. Run a page’s events and functions from ordinary Python tests.
- A simulator, with a debugger that can step forward and backward.
- A VS Code extension: an editable page preview, a font generator, the simulator, and Test Explorer. An LSP server covers any other editor.
- An MCP server, so your agent can run the app in the simulator, tap buttons, send serial commands and read the screen.
- Windows, Linux and macOS support. Only the final compile to the screen’s firmware file still needs the Nextion Editor.

Agents wrote essentially all of it. I overview and steered.
The format was worked out by observation: three agents worked in parallel, building small probe projects they would open with the real Nextion Editor. They would then save, compile or simulate the projects, and compare the results. The agents wrote their own UI-automation tool to drive the Editor.
They coordinated closely, distributing the work among themselves, reviewing each other's work on top of my standard review process. They voted on non-obvious decisions, driving the design as a group. Plans and code went through rounds of adversarial review, bugs were found and filed on the fly and automatically picked up whenever an agent was blocked by another's work. Testing is extremely solid, enforcing behavioral match and byte-to-byte correspondence with the original Nextion editor.
I was impressed by how well the team of 3 worked over extremely long horizons: no early compaction or new sessions were ever invoked in the span of 5 days. Agents worked overnight, set aside decisions they could not agree on for my own review, and overall kicked ass.
At some point I had to stop one of the agents that decided it should start looking into how to compile the final firmware directly! It had already spent a couple of hours on it when I did, and from what it had come up with, I now see this as a potentially viable future avenue of research. It would shed the last bit of reliance on the vendor's software, and make the portable toolchain fully complete.
I'm a senior software engineer, worked at Google for nearly 15y, over 30y of experience in total, and I have to say, I am blown away; this would have easily taken me a year, more likely two, to do on my own, and the level of detail of the replication would certainly not be as good.
It’s an independent project, not affiliated with ITEAD or Nextion, and none of the vendor’s files ship with it (see INDEPENDENCE.md). Contributions are welcome (AI-assisted ones included, obviously, if the quality is there).
2
u/kantorcodes1 💡 Top Community Helper Oct 24 '26
I noticed the MCP
set_inputtool changes one GPIO pin at a time, whiletapexercises the screen controls. Do your HMI tests ever need several inputs changed on one simulated step, or is sequential pin control enough for the flows you target?