Public | Automated Build

Last pushed: a month ago
Short Description
A little CLI to quickly join or leave many Slack channels
Full Description

Slack Mass Join/Leave/Star/Mute tool

This little CLI helps you to join, leave, add/remove stars from/to a bunch of channels based on regex patterns.

Usage

Before you can start, set up the SLACK_TOKEN environment variable with a valid Slack token as value and create an alias slackutil as you can see below:

export SLACK_TOKEN=<mytoken>
alias slackutil="docker run --rm -ti -e SLACK_TOKEN=${SLACK_TOKEN} giantswarm/slackutil"

Joining channels

To join all channels available to you:

slackutil join

To join all channels with names starting with ux-:

slackutil join --include "ux-.*"

To join all channels with names matching ux-.*, but not matching ux-noise:

slackutil join --include "ux-.*" --exclude "ux-noise"

You can use as many --include and --exclude patterns as you want to.

Pro tip: Test your patterns as described below before actually joining channels.

Leaving channels

The leave command works the same way as the join command.

To leave all channels containing jokes in their name, except for the one named actually-funny-jokes:

slackutil leave --include ".*jokes.*" --exclude "actually-funny-jokes"

Adding stars to/from channels

slackutil star --include "cool-.*"
slackutil unstar --include "uncool-.*"

Muting/unmuting channels

To mute all support channels:

slackutil mute --include "support-.*"

To unmute all support channels:

slackutil unmute --include "support-.*"

Testing your patterns

To just test your include and exclude patterns, use list instead:

slackutil list --include "a.*" --exclude "abc.*"

This way, the matching channel names will be printed. Nothing else.

Docker Pull Command
Owner
giantswarm
Source Repository