Tree


.gitignorecommits | blame
.rustfmt.tomlcommits | blame
LICENSEcommits | blame
Makefilecommits | blame
README.mdcommits | blame
sm.1commits | blame
sm.rscommits | blame

README.md

sm - Slack Message
==================
sm is a minimal binary to send a message to a Slack channel.


Requirements
------------
In order to build sm you need rustc and libtls (LibreSSL).


Installation
------------
Edit Makefile to match your local setup (sm is installed into
the /usr/local/bin namespace by default).

Afterwards enter the following command to build and install sm:

    make clean install


Running sm
----------
sm takes the channel id and the message, in this order, and posts
the message to that channel as the owner of SLACK_USER_TOKEN.
Exit status is 0 on success and non-zero on failure.

    sm C03DEET2M18 "hello from sm"

The message may also be read from standard input by passing "-":

    date | sm C03DEET2M18 -

Print the version:

    sm -V


Configuration
-------------
sm reads a single environment variable:

    SLACK_USER_TOKEN    Slack user token, e.g. xoxp-...

The token must have the chat:write scope for the target channel.


Download
--------
    got clone ssh://ijanc@ijanc.org/sm


License
-------
ISC — see LICENSE.