leejones / afk

A CLI to update your Slack status.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

afk

A CLI to update your Slack status.

Setup

Install

  1. Download the latest version from the Releases page on GitHub.
  2. Unpack the file and add it to your PATH (e.g. to /usr/local/bin)

Setup Slack API key

  1. Go to your Slack apps page
  2. Click Create New App
  3. Enter a name (e.g. afk-tool) and select the relevant workspace
  4. Click OAuth & Permissions in the left sidebar
  5. Under User Token Scopes add the following scopes
  6. dnd:read
  7. dnd:write
  8. users.profile:read
  9. users.profile:write
  10. At the top of the page, click Install to Workspace and go through the OAuth flow
  11. From the top of the page, copy the OAuth Access Token
  12. On your computer, create a new file at ~/.afk.yml
  13. Set limited permissions so it's not viewable by others: chmod 600 ~/.afk.yml
  14. Edit the file and add the OAuth Access Token you copied earlier in the following format:
slackToken: TODO-ADD-YOUR-TOKEN-HERE

Usage

afk --duration 1h --emoji :sandwich: --message "Lunch!"

For more details, run afk --help.

About

A CLI to update your Slack status.

License:MIT License


Languages

Language:Go 98.7%Language:Dockerfile 1.3%