I'd install the inverter and batteries in the bunkie. Leave the generator hooked up to the main panel and run the AC power out from the inverter to the main panel connected to a breaker with an interlock.
In the states 14/2 wire is rated for 15 amps 12/2 for 20 amps.