Complete generate main config