Using AI tools (Cursor, Claude Code etc) for Node-RED development & testing – experiences?

Hi all,

We run Node-RED in a multi-instance setup with:

  • We manage everything with Git directly in the Node-RED user folder (we don’t use the Node-RED’s project feature).

  • Flows and custom nodes are in GitHub (source control).

  • GitHub Actions build Docker images.

  • Deployment to multiple Node-RED instances (dev/stage/prod).

We’re now looking to use AI tools/agents like Cursor, Claude Code, and GitHub Copilot more in our way of working in general. But we are not sure how to do this in Node-RED in a good way. For example to help write Function nodes, develop flow structures, generate tests, and refactor flows.

One of the challenges we’re facing is the Node-RED file structure:

  • Everything sits in one large flows.json file.

  • To merge pull requests of the .json can often be tricky.

  • Diffs in PRs are hard to review — small logic changes get buried in layout/ID noise.

  • Would like to see more examples of how others structure their flows to make them AI-friendly and diff-friendly.

I’d love to hear from anyone who has good experience with handling this kind of scenarios. I know about that it is possible to get one .json-flow per flow-tab using external modules but I am not sure that that would solve this.

If you have examples, repo structures, or tips that work in practice, it would be great to see them.

Thanks!

I painfully recognize the one-flow-file challenge, and in fact, this was my main improvement request on the last Node-red survey.

I am running 10's of concurrent Node-red environments (dev, test, stage, prod, you name it), across many versions. For now, the only way I found to make the flow more maintainable, is to modularize it into loosely-coupled blocks, across multiple tabs.
I disciplined my team that a tab is the lowest granularity. Tabs are always locked, and you import & export whole tabs only, never just part of a tab. Reusable blocks should be set in separate tabs, and called via link-call (by named target only).

Once you have this structure (assuming your team is disciplined) you can automate check-in & check-out operations, either by scripting or simple RPA.