A CLI to update your Slack status.
- Download the latest version from the Releases page on GitHub.
- Unpack the file and add it to your PATH (e.g. to
/usr/local/bin
)
- Go to your Slack apps page
- Click Create New App
- Enter a name (e.g. afk-tool) and select the relevant workspace
- Click OAuth & Permissions in the left sidebar
- Under User Token Scopes add the following scopes
dnd:read
dnd:write
users.profile:read
users.profile:write
- At the top of the page, click Install to Workspace and go through the OAuth flow
- From the top of the page, copy the OAuth Access Token
- On your computer, create a new file at
~/.afk.yml
- Set limited permissions so it's not viewable by others:
chmod 600 ~/.afk.yml
- Edit the file and add the OAuth Access Token you copied earlier in the following format:
slackToken: TODO-ADD-YOUR-TOKEN-HERE
afk --duration 1h --emoji :sandwich: --message "Lunch!"
For more details, run afk --help
.