Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/leejones/afk
A CLI to update your Slack status.
https://github.com/leejones/afk
Last synced: about 1 month ago
JSON representation
A CLI to update your Slack status.
- Host: GitHub
- URL: https://github.com/leejones/afk
- Owner: leejones
- License: mit
- Created: 2021-02-21T19:34:25.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-04-06T13:08:04.000Z (almost 3 years ago)
- Last Synced: 2024-06-21T03:15:50.125Z (7 months ago)
- Language: Go
- Size: 18.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# 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](https://api.slack.com/apps) page
1. Click **Create New App**
1. Enter a name (e.g. afk-tool) and select the relevant workspace
1. Click **OAuth & Permissions** in the left sidebar
1. Under **User Token Scopes** add the following scopes
1. `dnd:read`
1. `dnd:write`
1. `users.profile:read`
1. `users.profile:write`
1. At the top of the page, click **Install to Workspace** and go through the OAuth flow
1. From the top of the page, copy the **OAuth Access Token**
1. On your computer, create a new file at `~/.afk.yml`
1. Set limited permissions so it's not viewable by others: `chmod 600 ~/.afk.yml`
1. 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`.