Simple cli tool to manage your slack workspace
Project description
slck-cli: Simple cli tool to manage your slack workspace
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
- Create a new Slack app
- Add scopes to your Bot Token
In order to use all the feature ofslck-cli, add scopes bellow:channels:historychannels:joinchannels:managechannels:readgroups:historygroups:readgroups:writeim:historyim:readim:writempim:historympim:readmpim:writeusers:readchat:write
- Install app 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 details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file slck-cli-0.3.1.tar.gz.
File metadata
- Download URL: slck-cli-0.3.1.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.8.12 Darwin/21.3.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
34a8949b9fc91a9eb9253803d80ec39e6f85a646250e601e13a79a081f802307
|
|
| MD5 |
903cfd8b2756e5c2031138fe8f0df6a7
|
|
| BLAKE2b-256 |
ec299459a6b0412c8adde18860a9219145d223d59c65e8cc5d888b1f290cbd3d
|
File details
Details for the file slck_cli-0.3.1-py3-none-any.whl.
File metadata
- Download URL: slck_cli-0.3.1-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.8.12 Darwin/21.3.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
18bf2d8de3664b3c5f5c0a01f9d48c9276b27ee912dc67578dd850cfa0003cf6
|
|
| MD5 |
c32af1ce063c67821ec7b58052bf1c4d
|
|
| BLAKE2b-256 |
b4a00ab599609554aa70a9cd5eddaa45cac9e3e69bee5c5230aba132d778c194
|