Continuing the discussion from Generate gerber files from script:
That’s a great idea which I have been thinking about as well. But requires a canvas implementation for interactively displaying a pcb board. Maybe KiCad’s canvas implementation can be used. I don’t like this idea though. Instead of learning inner workings of kicad, creating one from scratch sounds easier to me (not easy!).