Navigation Menu

Skip to content

Commit

Permalink
Made instructions clearer, added troubleshooting.
Browse files Browse the repository at this point in the history
  • Loading branch information
John committed Nov 22, 2017
1 parent 355d169 commit 4799584
Showing 1 changed file with 59 additions and 18 deletions.
77 changes: 59 additions & 18 deletions readme.md
@@ -1,26 +1,67 @@
Terminal Slack
==============

# Terminal Slack
A terminal interface for Slack.

![Screenshot of Termianl Slack](screen-shot.png)

## Controls
- Ctrl-c - select channels list
- Use the arrow keys (or j/k) and enter to select a channel
- Use '/' to search for a channel (enter to submit search)
- Ctrl-u - select users list
- Use the arrow keys (or j/k) and enter to select a channel
- Use '/' to search for a user (enter to submit search)
- Ctrl-w - select writing area
- Use enter to send a message
- Ctrl-l - select message list
- Use the arrow keys to scroll
- Escape - exit
| Command | Key Combination |
| ------- | --------------- |
| Move up | `up arrow` or `k` |
| Down up | `down arrow` or `j` |
| Search | `/` |
| Exit | `esc` |
| Select channels list | `ctrl` + `c` |
| Select users list | `ctrl` + `u` |
| Select writing area | `ctrl` + `w` |
| Select message list | `ctrl` + `l` |

## Prerequsites
- [Node](https://nodejs.org/en/) v6.0.0 or higher
- A [Slack](https://slack.com/) Account

## Setup
Download and enter the directory with `$ git clone https://github.com/evanyeung/terminal-slack.git && cd terminal-slack`. Make sure you have node and npm installed (can be installed from https://nodejs.org/) and run `$ npm install` to install the dependencies.
1. Download this repository:

```
git clone https://github.com/evanyeung/terminal-slack.git
```

2. Enter the directory:

```
cd terminal-slack
```

3. Install the package:

```
npm install
```

4. Create your Legacy Slack API token.

- Go to the [Slack Legacy Tokens](https://api.slack.com/custom-integrations/legacy-tokens) page
- Click **Generate Token**

5. Install your token on your local machine, inserting your token between the quotes:

```
export SLACK_TOKEN='your-slack-token-here'
```

6. Run the application:

Note: This project requires Node v6.0.0 or higher.
```
node main.js
```

7. Terminal Slack should now launch.

To connect to Slack, the app uses a legacy Slack API token. This can be found at https://api.slack.com/custom-integrations/legacy-tokens and must be added to your environment variables. To do this, copy it and run the command `$ export SLACK_TOKEN='[your token here]'` (or add it to your environment variables in an equivalent fashion). Run the app with `$ node main.js`.
## Troubleshooting
- **Terminal Slack opens for a second but then closes again**

![Alt text](screen-shot.png?raw=true "Terminal Slack")
This might be due to your `SLACK_TOKEN` not being recognised. Make sure the put your `SLACK_TOKEN` between the two single quotes when exporting it:

```
export SLACK_TOKEN='xoxp-254112160503-252950188691-252375361712-6cbf56aada30951a9d310a5f23d032a0'
```

0 comments on commit 4799584

Please sign in to comment.