Possible to shutdown/restart from the command line?

Just kill and restart the process, or use the rest api via curl if you want more advanced access.