# slack-line

> command line interface for some simple interractions with slack.com

Latest version **0.1.5** (published 2016-04-29) · ISC license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install slack-line
pnpm add slack-line
yarn add slack-line
bun add slack-line
```

Provides the command `slackit.js`.

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.1.5 |
| Published | 2016-04-29 |
| First published | 2016-04-27 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 9 |
| Known vulnerabilities | 0 (+26 in 2 direct dependencies) |
| Install scripts | no |
| Author | Evan Short |
| Maintainers | whtevn |
| Keywords | slack, cli, utility |

## Links

- npm: https://www.npmjs.com/package/slack-line
- npm.io page: https://npm.io/package/slack-line

## Dependencies (9)

- [ws](https://npm.io/package/ws.md) ^1.1.0
- [axios](https://npm.io/package/axios.md) ^0.10.0
- [yargs](https://npm.io/package/yargs.md) ^4.6.0
- [colors](https://npm.io/package/colors.md) ^1.1.2
- [mkdirp](https://npm.io/package/mkdirp.md) ^0.5.1
- [inquirer](https://npm.io/package/inquirer.md) ^1.0.2
- [dateformat](https://npm.io/package/dateformat.md) ^1.0.12
- [@slack/client](https://npm.io/package/@slack/client.md) ^3.0.0
- [logrotate-stream](https://npm.io/package/logrotate-stream.md) ^0.2.5

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 0.1.5 (latest) — 2016-04-29
- 0.1.4 — 2016-04-29
- 0.1.3 — 2016-04-29
- 0.1.2 — 2016-04-29
- 0.1.1 — 2016-04-29
- 0.0.6 — 2016-04-28
- 0.0.5 — 2016-04-28
- 0.0.4 — 2016-04-27
- 0.0.2 — 2016-04-27
- 0.0.1 — 2016-04-27

## README

command line interface for some simple interractions with slack.com 

this is a work in progress. feel free to contact through github with questions, concerns, or pull requests

installation
============
  
    npm install slack-line -g

configuration
=============

configuration happens at `~/.slack_info.json` by default. This may be configured with the `-s` or `--slack-info` flags

all configuration, aside from setting your slack token, is completely optional. Your name will be used based on your token

```js
{
  "user": {
    "username": "Evan-Bot",
    "icon_emoji": ":smiling-imp:"
    "slack_token": "xoxp-2398234273-234892734723-2372439874-239487234"
  }
}
```

alternatively, slack_token may be set with the `SLACK_TOKEN` environment variable. `--slack-info` takes precidence, if the
token exists.

you may also set a default feed to read from and write to by setting `channel` in the config file

```js
{
  "user": {
    "username": "Evan-Bot",
    "icon_emoji": ":smiling-imp:"
    "slack_token": "xoxp-2398234273-234892734723-2372439874-239487234"
    "channel": "channel_1"
  }
}
```

this channel will be overridden by command line arguments

you may also follow channels by writing their events into a file. in order to do this, you must define the channels you wish to follow

a file will be created for each room you follow. files are started fresh each time 
the follow command is started

```js
{
  "user": {
    "username": "Evan-Bot",
    "icon_emoji": ":smiling-imp:"
    "slack_token": "xoxp-2398234273-234892734723-2372439874-239487234"
    "channel": "channel_1"
  },
  "follow":[
    "channel_1",
    "channel_2"
  ]
}
```

finally, you may define the directory which these follow files will be saved. by default, they are saved in `~/.slack`. the history directory will be created if it doesn't already exist

```js
{
  "user": {
    "username": "Evan-Bot",
    "icon_emoji": ":smiling-imp:"
    "slack_token": "xoxp-2398234273-234892734723-2372439874-239487234"
    "channel": "channel_1"
  },
  "follow":[
    "channel_1",
    "channel_2"
  ],
  "history": "~/.slack"
}
```

options
=======

use the -h or --help flags to find out more about slack-line 

-h and --help are also available on each subcommand

read
----

read the last 20 messages from #channel_1

    slackit.js read -n 20 -c channel_1

read the last 20 minutes of messages from #channel_1

    slackit.js read -t 20 -c channel_1

write
-----

write a message to #channel_1

    slackit.js write -m "my message goes here" -c channel_1

follow
------

follow a set of channels by piping their output into text files to tail, grep, or otherwise watch 

channels are defined in `.slack_info.json`

---
_Source: https://npm.io/package/slack-line · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
