The easiest way to think about commands is as functions. As a function, it can accept arguments as input and can return some output.
Command(Input) -> Output
Like a function, a command doesn't have to return anything. Imagine a command to put your computer to sleep: there is no output that's needed. However, most commands have an output, which tells Slapdash what to do or show in the Command Bar. This output is a JSON-serialized data structure that conforms to the Command Response Specification.
They are mostly the same, but they do offer some trade-offs:
When developing a new command, Local Commands are the fastest and simplest way to get things going.
Local Commands are just scripts that are run on your computer. Slapdash uses stdin to send arguments to the command and interprets the stdout, expecting it to be a JSON Command Response. Cloud Commands are run by making a request to an HTTPS endpoint. Slapdash passes arguments to the command using RESTful conventions. Slapdash interprets the HTTPS response, expecting it to be a JSON Command Response.