I'm here for all of that that.
Using the Wikipedia example of a 1km, 5600g superconducting rail gun that launches at about 10km/s, we just need about a 10km gun to achieve 30km/s (length goes with launch speed squared).
Put it on the lunar surface for a roughly 2.5km/s penalty (I think, plus you obviously need to shoot it when the moon faces the right way).
No humans though, far too squishy. But you could launch a whole swarm of microprobes which could be a very effective distributed observation platform with a gigantic baseline.
If you haven't read it, the short story Maelstrom II by Arthur C. Clarke has a lunar rail gun in it. And the rest of the The Wind from the Sun collection is very good. The namesake solar sailing regatta story is great too.