GitHub - SkyfallWasTaken/slack-mass-leave: Mass leave Slack channels.

1 min read Original article ↗

slack-mass-leave

A CLI tool to leave multiple Slack channels at once.

This tool also supports using multiple user tokens to increase performance, searching channels, sorting by last read, and filtering private channels.

a screenshot of the UI

Usage

This tool uses Bun to run. If you haven't got Bun already installed:

curl -fsSL https://bun.sh/install | bash # Linux/macOS
powershell -c "irm bun.sh/install.ps1 | iex" # Windows

Then install and run the tool:

git clone https://github.com/skyfallwastaken/slack-mass-leave.git && cd slack-mass-leave
bun install
bun index.tsx <token1> [token2] [token3] ...

Examples

# Single token
bun index.tsx xoxp-your-token-here

# Multiple tokens (for higher throughput)
bun index.tsx xoxp-token-1 xoxp-token-2

# Comma-separated
bun index.tsx xoxp-token-1,xoxp-token-2

Getting a token

  1. Go to api.slack.com/apps and create a new app
  2. Add the following User Token Scopes: channels:read, channels:write, groups:read, groups:write
  3. Add a redirect URL. The URL itself doesn't actually matter! (e.g. https://google.com)
  4. Click the "Install to " button and copy the xoxp-... token

Controls

Key Action
↑↓ Navigate channels
Space Toggle channel selection
a Select/deselect all
p Toggle public-only filter
l Toggle sort by last read
s Search channels
Enter Proceed to confirmation

Built with Bun and Ink.