JSON RPC or something on a local socket, maybe use http://godoc.org/github.com/hawx/hadfield to do a Cmd type thing