Skip to main content

A collection of handy CLI utilities for Slack (purging messages, exporting history, etc.)

Project description

slackctl

cli tool to clear out your slack messages or export them to a neat dashboard.

setup

slack app permissions

you need to build a quick slack app to get a token:

  1. head to https://api.slack.com/apps and create a new app from scratch.
  2. add these user scopes under oauth and permissions:
    • channels:history
    • groups:history
    • chat:write
    • search:read
  3. click install to workspace and copy the token starting with xoxp-.

install

make sure your python venv is active, then run:

pip install -e .

config

save your credentials in a .env file so you don't have to keep pasting them:

SLACK_TOKEN="xoxp-your-token-here"
SLACK_CHANNEL="your-channel-id-here"

commands

purge

deletes your messages from the target channel using slack's search api.

dry run (safely checks what would get deleted):

slackctl purge

live run (actually deletes everything):

slackctl purge --no-dry-run

export

saves your message history to an offline html dashboard or raw data formats.

build html dashboard:

slackctl export

other formats:

slackctl export --format markdown -o messages.md
slackctl export --format json -o messages.json

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

slackctl-0.1.0.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

slackctl-0.1.0-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: slackctl-0.1.0.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for slackctl-0.1.0.tar.gz
Algorithm Hash digest
SHA256 797b2e1c87e566a23a986e0b3e8aaf05fa9c69fbbf79275b47f6b84f345dc9dd
MD5 90fff25f4c3d5025ac14ba2c0c86b410
BLAKE2b-256 7364f4fc787c42c715461a46383a495c64630565a7ad8d8dac814127bf151e4e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: slackctl-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for slackctl-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1875a7ef9a92c16b43d8698ed60bb451e6a7c38f8a804ddff90d18bab9448f14
MD5 847424fbc22127b767813042a022182d
BLAKE2b-256 e780e81c350be0ab4b279056763f9c875f1b64ec24e1af57becfee0c6f78ac1b

See more details on using hashes here.

Supported by

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