command
module
Version:
v0.1.0
Opens a new window with list of versions in this module.
Published: Jul 12, 2025
License: MIT
Opens a new window with license information.
Imports: 14
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
afk
A CLI to update your Slack status.
Setup
Install
- 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)
Setup Slack API key
- Go to your Slack apps page
- Click Create New App
- Click From scratch
- 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
your_workspace_name 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
Usage
afk --duration 1h --emoji :sandwich: --message "Lunch!"
For more details, run afk --help.
Creating a new release
This is the standard release process for maintainers.
-
Install gh (the GitHub CLI) if you don't have it already.
-
Note the most recent release version:
gh release list --limit 1
-
Locally, checkout the main branch to the latest revision.
-
Set the version variable for the new release (in the form vX.Y.Z):
read -p "Enter the new version (e.g., v1.2.3): " VERSION
-
Run the release script:
bin/release $VERSION
-
Create the release using the GitHub CLI:
gh release create $VERSION $(find "releases/${VERSION}/targets" -name "*.tar.gz") \
--title "Release $VERSION" \
--generate-notes
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.