Is there a way to send server commands using command line?

Take a look at this post : Mineos_console.js documentation?