Skip to main content

Simple cli tool to manage your slack workspace

Project description

slck-cli: Simple cli tool to manage your slack workspace

PyPI - Python Version PyPI GitHub license codecov Run tests

Basic Usage

# listing all users in workspace
$ slck user list
User(id='U031L3JNBKS', name='taro', real_name='Taro Yamada')
User(id='U036NS9S6HL', name='jiro', real_name='Jiro Tanaka')
User(id='U032SU3SKBS', name='hanako', real_name='Hanako Suzuki')

# user search by real_name (or name or id)
$ slck user find --real_name "Taro Yamada"
User(id='U031L3JNBKS', name='taro', real_name='Taro Yamada')

# channel list (filtered by prefix)
$ slck channel list --prefix general
Channel(id='C02AFAUOK33', name='general')

# most reacted post in the channel
$ slck message popular general
Message(message_type='message', user=User(id='U031L3JNBKS', name='taro', real_name='Taro Yamada'), channel=Channel(id='C02AFAUOK33', name='general'), ts='1647648476.156199', text='テスト', num_reply=0, num_replyuser=0, num_reaction=3, permalink='https://foo.slack.com/archives/C02AFAUOK33/p23471289471123')

# post award message
$ slck message award your-channel --post
Bot is about to post award message:
  最もリアクションを獲得したのは <@U031L3JNBKS|taro>さんのこのポスト!おめでとうございます!:raised_hands:
https://foo.slack.com/archives/C02AFAUOK33/
to your-channel. Are you sure? [Y/n]Y
Posted!

Installation

pip install slck-cli

Preparation

Create SlackApp and Install to your workspace

Set token

Set your slack bot token ( xoxb-... ) to your environmental varialble SLACK_BOT_TOKEN

export SLACK_BOT_TOKEN = "xoxb-your-token"

License

This software is released under the MIT License, see LICENSE.

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

slck-cli-0.3.1.tar.gz (6.9 kB view hashes)

Uploaded Source

Built Distribution

slck_cli-0.3.1-py3-none-any.whl (7.8 kB view hashes)

Uploaded Python 3

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