Slkecho is a CLI tool to post message to Slack like echo command.
Install it yourself as:
gem install slkecho
or add this line to your application's Gemfile:
source "https://rubygems.pkg.github.com/okonomi" do
gem "slkecho"
end
More details: Working with the RubyGems registry - GitHub Docs
slkecho -c <channel> -m <mention> message
or message from stdin:
cat message.txt | slkecho -c <channel> -m <mention>
Slack channel to post message.
See below: https://api.slack.com/methods/chat.postMessage#arg_channel
Search for the target member by email address and adds a mentions to the message. Mention is only valid for members of the channel to which you are posting.
Set user name for message.
See below: https://api.slack.com/methods/chat.postMessage#arg_username
Set user icon image for message by URL.
See below: https://api.slack.com/methods/chat.postMessage#arg_icon_url
Set user image for message by emoji.
See below: https://api.slack.com/methods/chat.postMessage#arg_icon_emoji
Post message as blocks.
See below: https://api.slack.com/methods/chat.postMessage#arg_blocks
Bug reports and pull requests are welcome on GitHub at https://github.com/okonomi/slkecho.
The gem is available as open source under the terms of the MIT License.