{"id":27140321,"url":"https://github.com/mlane/slack-drafter","last_synced_at":"2026-05-09T10:06:45.648Z","repository":{"id":286323041,"uuid":"961055548","full_name":"mlane/slack-drafter","owner":"mlane","description":"A lightweight Slack bot that suggests personalized, GPT-powered replies when you’re mentioned in a thread — fast, human-reviewed, and built for productivity.","archived":false,"fork":false,"pushed_at":"2025-04-07T23:03:29.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T00:44:28.875Z","etag":null,"topics":["ai-assistant","chatbot","developer-productivity","fastapi","gpt-4","human-in-the-loop","openai","personalized-replies","productivity-tools","python","reply-generator","slack-app","slack-bot"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mlane.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-04-05T16:53:01.000Z","updated_at":"2025-04-07T23:03:32.000Z","dependencies_parsed_at":"2025-04-06T22:20:03.226Z","dependency_job_id":null,"html_url":"https://github.com/mlane/slack-drafter","commit_stats":null,"previous_names":["mlane/slack-reply-assistant","mlane/slack-drafter"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlane%2Fslack-drafter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlane%2Fslack-drafter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlane%2Fslack-drafter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlane%2Fslack-drafter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mlane","download_url":"https://codeload.github.com/mlane/slack-drafter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248137997,"owners_count":21053775,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-assistant","chatbot","developer-productivity","fastapi","gpt-4","human-in-the-loop","openai","personalized-replies","productivity-tools","python","reply-generator","slack-app","slack-bot"],"created_at":"2025-04-08T05:51:42.123Z","updated_at":"2026-05-09T10:06:40.591Z","avatar_url":"https://github.com/mlane.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# slack-drafter\n\nA lightweight GPT-powered **Slack bot** that helps you reply faster — without sounding like a robot.\n\n\u003e Powered by GPT-4 + LangChain. Designed for thoughtful humans who want to save time.\n\n---\n\n## Features\n\n- ⌨️ Use `/draft [thread URL]` in Slack to generate a reply suggestion\n- 🧵 Understands full thread context to avoid repetition\n- 🔣 Adapts to your voice (IC-focused tone by default)\n- 🔒 Replies are private until you choose to send them\n- ⚡ Built with FastAPI, Slack Bolt, and LangChain\n\n---\n\n## Quickstart\n\n```bash\ngit clone https://github.com/mlane/slack-drafter.git\ncd slack-drafter\n\n# Create and activate virtual environment\npython3.11 -m venv .venv\nsource .venv/bin/activate\n\n# Install dependencies\npip install -r requirements.txt\n\n# Copy and edit environment variables\ncp .env.sample .env\n# Then add your OpenAI and Slack credentials\n```\n\nRun the app:\n\n```bash\npython src/main.py\n```\n\n---\n\n## Environment Variables\n\n```env\nLANGCHAIN_API_KEY=your-langchain-api-key\nLANGSMITH_ENDPOINT=\"https://api.smith.langchain.com\"\nLANGSMITH_PROJECT=your-project-name\nLANGCHAIN_TRACING_V2=true\nOPENAI_API_KEY=your-openai-key\nSLACK_ALLOWED_USERS=user-id-1,user-id-2\nSLACK_BOT_TOKEN=xoxb-your-slack-token\nSLACK_SIGNING_SECRET=your-signing-secret\n```\n\n\u003e Note: The LangChain and LangSmith variables are optional and currently unused.\n\u003e They're included for future support (e.g. memory, tracing, or LangSmith debugging).\n\n---\n\n## Minimal Testing\n\nTo keep LLM costs low, we recommend basic tests for:\n\n- `extract_slack_ids()`\n- `format_timestamp()`\n- `format_user()`\n\nExample:\n\n```python\n# tests/slack_utils_tests.py\ndef test_format_timestamp():\n    ts = \"1714774008.000000\"\n    formatted = format_timestamp(ts)\n    assert formatted == \"2024-05-03 10:06 PM UTC\"\n```\n\n---\n\n## Slack App Setup\n\n1. Create a Slack App at https://api.slack.com/apps\n2. Enable **Slash Commands** and **Event Subscriptions**\n3. Add these OAuth scopes:\n   - `commands`\n   - `chat:write`\n   - `channels:history`\n   - `users:read`\n4. Create a slash command:\n   - Command: `/draft`\n   - Request URL: `https://\u003cyour-domain\u003e/slack/events`\n5. Install to your workspace\n\n---\n\n## Roadmap\n\n- [x] Slash command reply suggester\n- [x] Ephemeral message previews\n- [x] Tone tuned to IC voice\n- [ ] Optional App Home fallback UI\n- [ ] Long-term personalization via memory/context\n- [ ] Message quality scoring (e.g., “Too wordy”)\n\n---\n\n## 🧑‍💻 License\n\n[MIT](./LICENSE)\n\n## Contributions\n\nPRs welcome. Please keep things minimal, tested, and low-dependency.\n\n---\n\n## Why \"slack-drafter\"?\n\nThe goal is simple: help you draft thoughtful replies — fast. Whether you're in back-to-back meetings or catching up on threads, this Slack bot gives you a head start without losing your voice.\n\nPreviously named `slack-reply-assistant`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlane%2Fslack-drafter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmlane%2Fslack-drafter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlane%2Fslack-drafter/lists"}