Skip to content

Latest commit

 

History

History
50 lines (38 loc) · 1.33 KB

configuration-guide.md

File metadata and controls

50 lines (38 loc) · 1.33 KB

Configuration Guide

Slackcat may be configured via a simple or advanced configuration.

Default Path

If your environment specifies an XDG Base Directory, slackcat will use the configuration file at ~/.config/slackcat/config; otherwise, will fallback to ~/.slackcat

Simple Configuration

Generate a new Slack token with:

slackcat --configure

A new browser window will be opened for you to confirm the request via Slack, and you'll be returned a token.

Create a Slackcat config file and you're ready to go!

echo '<your-slack-token>' > ~/.slackcat

Advanced Configuration

Advanced configuration allows for multiple Slack teams, a default team, and default channel in TOML format.

Example ~/.config/slackcat Config

default_team = "team1"
default_channel = "general"

[teams]
  team1 = "<team1-slack-token>"
  team2 = "<team2-slack-token>"

By default, all messages will be sent to the team1 general channel.

Example Usage

Post a file to team1 #general channel:

slackcat /path/to/file.txt

Post a file to team1 #testing channel:

slackcat -c testing /path/to/file.txt

Post a file to team2 #testing channel:

slackcat -c team2:testing /path/to/file.txt