Skip to main content

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


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 details)

Uploaded Source

Built Distribution

clicky-0.1.0-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file clicky-0.1.0.tar.gz.

File metadata

  • Download URL: clicky-0.1.0.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.0 CPython/3.10.12 Linux/5.15.0-1042-azure

File hashes

Hashes for clicky-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0f3e20b996b716c331dae550eef6f33726a723166f03904a8433c340ff020eca
MD5 97ac80d63a9bcf48703f897435bcfad9
BLAKE2b-256 fa68be3fa69263438dad53c4d7247f2dc6a9308b4719901324863d42992c48a7

See more details on using hashes here.

File details

Details for the file clicky-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: clicky-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.0 CPython/3.10.12 Linux/5.15.0-1042-azure

File hashes

Hashes for clicky-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a9db5f0af4fd95a0f27699a39a2753e62cc28e011f96061d919622def61eb72c
MD5 e933739bbde66084f74f0779bd43d8ed
BLAKE2b-256 a427946603181d2953dcf14db78d0c3dda30337d086f07046c6be61d69f6a553

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page