Skip to content

crowdworks/slacts

Repository files navigation

slacts

GoDoc CircleCI Go Report Card GolangCI

A CLI tool for Slack statistics

Getting Started

Prerequisites

Generate Slack Token

To get Slack token, access here: https://api.slack.com/custom-integrations/legacy-tokens

Set Slack token

Install direnv.

$ brew install direnv # macOS

Copy .envrc from .envrc.sample and set Slack token.

$ cp .envrc.sample .envrc
$ vi .envrc

export SLACK_API_TOKEN=xxxxxxxxxxxxxxxxxxx

Run

$ go run cmd/slacts/main.go slack count "in#general @channel"
result: 12

or

$ make install
go install github.com/crowdworks/slacts/cmd/slacts

$ slacts slack count "in#general @channel"
result: 12

Synopsis

slacts slack count <slack_search_term>

Returns the number of search result. Please refer Guide to search in Slack.

License

MIT