<commit_before># slackcat
Slackcat is a simple commandline utility to post snippets to Slack.


  <img width="500px" src="https://raw.githubusercontent.com/vektorlab/slackcat/master/demo.gif" alt="slackcat"/>


## Quickstart

### Installing
Download the latest release for your platform:

```bash
curl -Lo slackcat https://github.com/vektorlab/slackcat/releases/download/v1.3/slackcat-1.3-$(uname -s)-amd64
sudo mv slackcat /usr/local/bin/
sudo chmod +x /usr/local/bin/slackcat
```

`slackcat` is also available via homebrew:
```brew
brew install slackcat
```

### Configuration

Generate an initial config, or add a new team token with:
```bash
slackcat --configure
```
You'll be prompted for a team nickname and a new browser window will be opened for you to confirm the request via Slack. Provide the returned token to slackcat when prompted, and you're ready to go!

For configuring multiple teams and default channels, see [Configuration Guide](https://github.com/vektorlab/slackcat/blob/master/docs/configuration-guide.md).

## Usage
Pipe command output as a text snippet:
```bash
$ echo -e "hi\nthere" | slackcat --channel general --filename hello
*slackcat* file hello uploaded to general
```

Post an existing file:
```bash
$ slackcat --channel general /home/user/bot.png
*slackcat* file bot.png uploaded to general
```

Stream input continously:
```bash
$ tail -F -n0 /path/to/log | slackcat --channel general --stream<commit_msg>add build steps to readme<commit_after># slackcat
Slackcat is a simple commandline utility to post snippets to Slack.


  <img width="500px" src="https://raw.githubusercontent.com/vektorlab/slackcat/master/demo.gif" alt="slackcat"/>


## Installing
Download the latest release for your platform:

```bash
curl -Lo slackcat https://github.com/vektorlab/slackcat/releases/download/v1.3/slackcat-1.3-$(uname -s)-amd64
sudo mv slackcat /usr/local/bin/
sudo chmod +x /usr/local/bin/slackcat
```

`slackcat` is also available via homebrew:
```brew
brew install slackcat
```

## Building
To optionally build `slackcat` from source, ensure you have [dep](https://github.com/golang/dep) installed and run:
```
go get github.com/vektorlab/slackcat && \
cd $GOPATH/src/github.com/vektorlab/slackcat && \
make build
```

## Configuration

Generate an initial config, or add a new team token with:
```bash
slackcat --configure
```
You'll be prompted for a team nickname and a new browser window will be opened for you to confirm the request via Slack. Provide the returned token to slackcat when prompted, and you're ready to go!

For configuring multiple teams and default channels, see [Configuration Guide](https://github.com/vektorlab/slackcat/blob/master/docs/configuration-guide.md).

## Usage
Pipe command output as a text snippet:
```bash
$ echo -e "hi\nthere" | slackcat --channel general --filename hello
*slackcat* file hello uploaded to general
```

Post an existing file:
```bash
$ slackcat --channel general /home/user/bot.png
*slackcat* file bot.png uploaded to general
```

Stream input continously:
```bash
$ tail -F -n0 /path/to/log | slackcat --channel general --stream
{'fraction_non_alphanumeric': 0.11717495987158909, 'fraction_numerical': 0.006420545746388443, 'mean_word_length': 4.485915492957746, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 7, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2780432', 'n_tokens_mistral': 1048, 'n_tokens_neox': 953, 'n_words': 345}