There are numerous ways to do a SAFE simple whole-house generator hookup.
I have an interlock kit installed in my main panel. I flip the main and generator breaker (which are mechanically interlocked) and the whole house is switched over to the generator.
There is also a device you can have connected to your meter base. The only "automatic" aspect is that is automatically switches when you plug the generator in.