can the commander in chief be court martialed?
No, just like the UCMJ - "Uniform Code of Military Justice", a court martial only applies to military personnel.
Court Martial: NOUN: "A judicial court for trying members of the armed services accused of offenses against military law."
The UCMJ isn't a judicial court, it is what being sent to your room is compared to going to jail.
The Commander in Chief is by definition a civilian.
Canada's Commander in Chief, or at least her personal representative in Canada was just about to be "court marshalled." She resigned instead. Great astronaut, not a great Governor Genersl.
Our figurative Commander in Chief has to be tried by parliament. The last one to undergo such a trial lost his head over the whole thing - Charles I.
@DougTElmira It is unfortuneate she did not take her job more seriously and act accordingly