Who was the main general for the Confederacy?

Robert E. Lee
There was no position of General-in-Chief until January 1865 (too late to make any difference), when it was given to Robert E. Lee.

Before that, the Confederate president Jefferson Davis had tried to perform this function.