Turn CLI applications into Slack & Discord bots.
Project description
Clicky
NOTE: This project is incomplete. It is not yet ready for day-to-day use.
Clicky is a straightforward Python tool for taking CLIs written using click and exposing them as bots on Slack & Discord.
Clicky is inspired-by and borrows some code from Trogon.
Installation
Clicky is available on PyPI:
pip install clicky
Usage
Clicky is designed to be used as a library that can be quickly integrated into an existing CLI application.
import click
from clicky.frontends.click import become_clicky
@become_clicky(
config={
"servers": {
"my_slack_server": {
"bot": "slack",
"prefix": "!hello",
"tokens": {
"app": "<app_token>",
"bot": "<bot_token>"
}
}
},
"whitelist": [
{"on": "my_slack_server", "type": "user", "id": "TkTech", "commands": [".*"]}
]
}
)
@click.command()
def cli():
"""A simple CLI."""
click.echo('Hello, world!')
if __name__ == '__main__':
cli()
License
Clicky is licensed under the MIT license. See the LICENSE file for more information.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
clicky-0.1.0.tar.gz
(6.8 kB
view hashes)
Built Distribution
clicky-0.1.0-py3-none-any.whl
(8.8 kB
view hashes)