I've been trying, for some time now, to create a local process that will act as a CLI for my server. The idea is similar to what Drush does for Drupal servers.
Now, After I've succeeded, I haven't created the CLI interface yet (will probably use a 3rd party code) but I wanted to share my solution withto my biggest obstacle in the worldmatter: Transferring messages between a local process to my running and active server without using REST services because they add security risk with some commands.