afk

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 12, 2025 License: MIT Imports: 14 Imported by: 0

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 page
  2. Click Create New App
  3. Click From scratch
  4. Enter a name (e.g. afk-tool) and select the relevant workspace
  5. Click OAuth & Permissions in the left sidebar
  6. Under User Token Scopes add the following scopes
    1. dnd:read
    2. dnd:write
    3. users.profile:read
    4. users.profile:write
  7. At the top of the page, click Install to your_workspace_name and go through the OAuth flow
  8. From the top of the page, copy the OAuth Access Token
  9. On your computer, create a new file at ~/.afk.yml
  10. Set limited permissions so it's not viewable by others: chmod 600 ~/.afk.yml
  11. 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.

  1. Install gh (the GitHub CLI) if you don't have it already.

  2. Note the most recent release version:

    gh release list --limit 1
    
  3. Locally, checkout the main branch to the latest revision.

  4. 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
    
  5. Run the release script:

    bin/release $VERSION
    
  6. Create the release using the GitHub CLI:

    gh release create $VERSION $(find "releases/${VERSION}/targets" -name "*.tar.gz") \
      --title "Release $VERSION" \
      --generate-notes
    

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL