Oko/Docs

Command reference

oko message send

Creates one iMessage chat through the named messaging provider, with the text from standard input, and prints the chat the provider created.

Invocation#

Command
oko message send --provider ultrareach --url URL --from SENDER --to HANDLE [--service NAME] < text

Inputs and options#

  • --provider names the provider; ultrareach is the one Oko implements, and none is assumed. --url must be HTTPS or loopback HTTP and no redirect is followed; --from and --to name the sender and the handle; the service token is read from Skarbiec.

Output and state effect#

  • Sends the message; prints the created chat as JSON.

Refusals and safe exits#

  • `oko message send needs --provider naming the messaging provider; Oko sends through ultrareach`, `oko message takes send; got <verb>`, `oko message send requires --url <text>` and the same for --from and --to (exit 2); `Ultrareach URL must use HTTPS or loopback HTTP: <url>`; `oko message send needs a message` for empty input; `the message on standard input is not readable: <error>`; `<item>#<field> cannot be read by <consumer>: <detail>`; `Ultrareach HTTP <status>: <body>`; `Ultrareach at <url> could not be reached: <error>`; `Ultrareach's answer could not be read: <error>`; `Ultrareach answered something that is not JSON: <text>`.

CLI reference#