This is a really interesting game. I've never seen anything quite like it!
I did find it a little frustrating that I had no time to explore the language via the terminal, because I'm constantly being swarmed by enemies. It'd be better if enemies came in waves, and the next wave doesn't start until you explicitly start it (via some command?). In between waves, the terminal should stay open and let you try stuff. This way, you could even define your own spells (functions), and then use them in the next wave.
As it is, I think players are going to find typing the spell names to be just an awkward UI for invoking spells — keyboard shortcuts or buttons would be a better UI. You've got a scripting engine built in, so give your users a chance to actually script!