1

I'am trying to test the example of the keybase chat api :

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

but all i got is this error message :

Error parsing command line arguments: flag needs an argument: -m

Any ideas ?

Thanks and regards

Bussiere
  • 500
  • 13
  • 60
  • 119

2 Answers2

0

You can try following commands for keybase chat API/keybase-cli:

>keybase chat send <username> <your message>
>keybase chat read <username/channel>

Other examples given in help will work like the above commands. No need to pass JSON here.

0

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...'}}}}"
Aaron Meese
  • 1,670
  • 3
  • 22
  • 32