A command-line tool that fetches Slack conversations and generates AI-powered summaries using GitHub Models.
- Fetch Slack conversations using URLs
- Generate intelligent summaries using AI
- Customizable prompt templates
- Clean, formatted output suitable for documentation or reporting
Install the GitHub CLI if you haven't already:
# macOS (using Homebrew)
brew install gh
# Or download from: https://cli.github.com/Install the Slack extension for GitHub CLI:
gh extension install github.com/rneatherway/gh-slackMake sure you're authenticated with GitHub CLI:
gh auth loginYou'll also need to configure the Slack extension with your workspace credentials.
Create a GitHub Personal Access Token (PAT) with models: read permission for accessing GitHub Models:
- Go to GitHub Settings → Developer settings → Personal access tokens → Fine-grained tokens
- Create a new token with
models: readpermission - Set the token as an environment variable:
export GITHUB_MODELS_TOKEN=github_pat_11XXXXXXX0dSNOTjmU83gq_WXmGokWwcWeabcQFbQGav4qcM893e3kwinSDuqlB964FVXXXXXX7HLJwPoNote: Replace the X's with your actual token. This token is required for the AI summarization functionality.
-
Clone this repository
-
Copy
prompt.txt.exampletoprompt.txt -
Customize the prompt template according to your needs
-
Make the script executable (if needed):
chmod +x slack-summarizer.sh
./slack-summarizer.sh <slack-url>./slack-summarizer.sh https://yourworkspace.slack.com/archives/C1234567890/p1234567890123456For convenient access from anywhere in your terminal, consider setting up the tool globally:
1. Clone to a dedicated bin folder:
mkdir -p ~/bin
cd ~/bin
git clone <this-repo-url> slack-summarizer2. Add alias and PATH to your shell profile:
Add the following lines to your ~/.zprofile (or ~/.zshrc for zsh, ~/.bash_profile for bash):
# Add ~/bin to PATH
export PATH="$HOME/bin:$PATH"
# Slack Summarizer alias
alias ss="slack-summarizer/slack-summarizer.sh"3. Reload your shell:
source ~/.zprofile4. Now you can use it from anywhere:
ss https://yourworkspace.slack.com/archives/C1234567890/p1234567890123456Edit prompt.txt to customize how the AI summarizes your Slack conversations. The template supports:
- Custom instructions for summary format
- Specific mention handling
- Output style preferences
- Context-specific requirements
- Fetch: Uses
gh slack readto retrieve the Slack conversation content - Process: Combines the conversation with your custom prompt template
- Summarize: Sends the content to GitHub Models for AI-powered summarization
- Output: Returns a clean, formatted summary
slack-summarizer.sh- Main scriptprompt.txt- Your customized prompt template (create from example)prompt.txt.example- Example prompt template
Feel free to submit issues and enhancement requests!
This project is open source and available under the MIT License.