Skip to content

Latest commit

 

History

History
50 lines (30 loc) · 1.07 KB

README.md

File metadata and controls

50 lines (30 loc) · 1.07 KB

AFK Command Line Utility

Use this utility to notify you on Telegram when your long running command finishes running.

How to use

  1. Copy the afk file into your bin path (eg. /usr/local/bin)

    cp afk /usr/local/bin/
    
  2. Get a Telegram bot. You will need to get the bot_token and a recipient chat_id.

  3. Add a .afkconfig file to your home directory with this content:

    AFK_BOT_TOKEN=<the Telegram bot token from the @botfather>
    RECIPIENT_ID=<chat_id of recipient - either a person or a group>

    Note: afk will first look in your current folder for a .afkconfig file before looking inside $HOME.

  4. Prepend afk to your command:

    afk <command>

    Example:

    afk npm test

    Using afk

  5. Telegram messages should show up:

    MacOS Notification

    Telegram Message

Dependency

  • cURL (in the command line)

License

MIT