From 4799584bcdbc591dd9e0a5a8e06c655d375b9b25 Mon Sep 17 00:00:00 2001 From: John Date: Wed, 22 Nov 2017 12:28:43 +0000 Subject: [PATCH] Made instructions clearer, added troubleshooting. --- readme.md | 77 ++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 59 insertions(+), 18 deletions(-) diff --git a/readme.md b/readme.md index 00404ce..be99f28 100644 --- a/readme.md +++ b/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' + ```