Update your slack status straight from the terminal.
Focus is precious, and Slack is full of many distractions! Utilize this tool to let your team know you are heads down
straight from the command line - far away from all cute cat and dog photos.
Inside your chosen terminal app (I recommend hyper), clone this repository to your local environment using the command
git clone https://github.com/abbeymondshein/slack-status-cli.git
Once you've cloned the repository, navigate to the folder using the command cd slack-status-cli
. Once there, you can install status globally with the following command:
$ npm install -g .
- On
https://api.slack.com/apps
clickCreate New App
. - Give your app a name, select your workspace &
Create App
. - Navigate to the
Oauth & Permissions
page and in theUser Token Scopes
section, authorize your app for the following scopes:- dnd:read
- dnd:write
- users.profile:read
- users.profile:write
- Scroll up to the top of the page and hit
Install to Workspace
. - Once the app is installed, the page will have a section called
OAuth Tokens for Your Team
. Copy the value followingUser OAuth Token
. This generally starts with something likexoxb-
. You will need this token for the next step: setting up your environment variables.
Create a copy of the .env.sample
file and name it .env
. Make sure to update it with your slack token from the previous step.
SLACK_TOKEN = xoxp-therestofyourtoken12328320940923849238
The headsdown
command is configured to use an emoji from Slack's Remote Work Expansion Pack. Add this on for free to your workspace to achieve the desired result!
Once you've installed it globally, you're ready to go! Entering status -h
will pull up a full list of the available commands and actions.
The following commands can be used following the status
keyword to update your status.
Command (short, long versions) | Action | Example |
---|---|---|
-h , --help |
Displays Help Menu (Detailing all commands) | status -h |
-c , --current |
Loads current status | status -c |
-hd , --headsdown |
A preconfigured "heads down" status. Optionally follow with amount of minutes to set for. Defaults to 30 Minute DND & non-expiring status duration. |
status -hd 45 |
-x , --clear |
Clear current status | status -x |
-dnd ,--snooze |
Snooze / Do not disturb. Enter amount of minutes to snooze or will default to 30min | status -dnd 45 |
-w ,--wake |
Wake - End snooze / Do not disturb. | status -w |
-m ,--minutes |
Minutes to pass to another command. | status -dnd -m 2 |
Feel free to open a PR or Issue with suggestions / improvements!
Upcoming enhancement concepts:
- complete status update ( emoji, status, duration, DND duration)
- emoji autocompletion
- extended status durations (days)
- ✨ interface refinement ✨