Is it possible to create and wire together nodes and flows without the editor.
I'd imagine something like
create flow
add node
connect node
add node
connect node
run flow
using just a script that uses the node red api?
Welcome to forum.
I'm not going to say anything about if it is possible or not, never tried. But can I ask why?
Not the OP, but it would be nifty for stuff like dynamically tweaking dashboards.
The flow.json file stores all your nodes and flows, you may write a JS script that modifies it .... it's not that hard to understand the structure of the file ...
I think you don't even have to worry about unique IDs for wires, flows and nodes: you may use the built-in unique ID generator or use your own, it will work either way ...
Of course, there' no guarantee that this flows.json structure will last ...
Not sure how you would then edit the properties of each of those nodes...
You do know that you can do speed wiring in the editor by using the keyboard...
ctrl/cmd click to start - type a few letters of the node you want - ctrl/cmd enter to add it - and repeat until you get to an end node like debug.
There is/was a thing called https://cylonjs.com/ which sort of had that kind of style in that you wrote code - but it used the . style of javascript to add things together.