How should an air compressor be wired?
Short answer: A shop compressor should be on a dedicated circuit with wire, breaker and disconnect sized for the motor nameplate, installed to local code by a licensed electrician.
Compressor motors draw high current when they start. Undersized wiring causes voltage drop, which makes motors run hot, trip breakers and fail early. That is why most makers specify a dedicated circuit rather than sharing one with lights or other tools.
The electrician will size the wire and overcurrent protection from the motor's nameplate current and the applicable code. Many installations also require a disconnect switch within sight of the compressor, and some motors use a magnetic starter. Long runs from the panel may call for larger wire to limit voltage drop.
Avoid extension cords. If the compressor must sit far from the outlet, move the compressor near the power and run a longer air line instead. Never bypass a pressure switch, overload or thermal protector. Lock out power before any service. Having a licensed electrician do the wiring protects you, your insurance and the motor warranty.
General guidance only. Follow the vehicle and tool manufacturer's procedures, and confirm vehicle coverage on the tool maker's list before buying.