Post Multiple Message to Multiple Channel with single command.
castit
is a tool to send slack message to multiple channel with only single command.
Think of situation like working remotely and you belong to multiple teams.
If you need to send Good Morning! Stated Working!
to multiple team's channel, this tool is for you.
Just write config like below
token: "<MY-TOKEN>"
casts:
- channel: "#teamA"
content: "good morning"
- channel: "#teamB"
content: "Started Working"
- channel: "#teamC"
content: "Office Hour Stared. Just ask me anything."
and run
java -jar castit.jar --config=/path/to/config.yml
Usage: cast [OPTIONS]
Options:
--config PATH
--cast TEXT cast name
-h, --help Show this message and exit
You can install via Homebrew
$ brew tap omuomugin/tap
$ brew install castit
TBD
You need to create an app to your slack channel as a user.
see https://api.slack.com/apps
You need a config file written in yaml. (other type will be supported in near future maybe).
token: "<MY-TOKEN>"
casts:
- name: "start"
messages:
- channel: "#teamA"
content: "good morning"
- channel: "#teamB"
content: "Started Working"
- channel: "#teamC"
content: "Office Hour Stared. Just ask me anything."
Ofcourse you can create multiple cast type. You might want to write another cast type like below.
token: MY TOKEN
casts:
- name: "start"
messages:
- channel: "#teamA"
content: "good morning"
- channel: "#teamB"
content: "Started Working"
- channel: "#teamC"
content: "Office Hour Stared. Just ask me anything."
- name: "end"
messages:
- channel: "#teamA"
content: "good night"
- channel: "#teamB"
content: "Finished Working. Have a good evening"
- channel: "#teamC"
content: "Office Hour Ended. Please talk to me tomorrow."
castit --config=path/to/your/config.yaml --cast=start
Whole CLI tool is written in Kotlin.
And I want to thank all of the great libraries out there.
- ajalt/clikt for basic CLI implementation
- kittinunf/fuel for Http Request
- charleskorn/kaml for serializing, desirializing YAML
Thanks to johnrengelman/shadow , it is easy to build fat jar which can use it from command line.
./gradlew clean shadowjar
and you just run jar with command.
java -jar build/libs/castit-x.y.z-all.jar --help