Pass JSON to Keybase Chat API

See here for the original answer.

The -m flag is intended to take a JSON string directly instead of reading from STDIN, which is what your echo statement is passing.

If you want to read from echo, simply remove the -m flag entirely. If you wish to use the -m flag and read from a string, try the following format:

keybase chat api -m "{'method': 'send', 'params': {'options': {'channel': {'name': 'you', 'public': true}, 'message': {'body': 'Still going...'}}}}"

Tags

  1. keybase (Private)
  2. api (Private)
  3. json (Private)
  4. stack-overflow (Private)
  5. answer (Private)