On the NeXT machine, there was a command called sndplay that would play .snd files from the command line.
It’s not too tough to put together a similar one for Mac OS X. We can play many more kinds of sounds than the old NeXT sndplay command did. On the other hand, since NSSound uses QuickTime to play some media formats, a run loop is required for sounds to keep playing, so that requires a few gyrations.
(See also this cocoa-dev message)