Repository navigation
Expand file tree
/
Copy path.env.example
More file actions
57 lines (49 loc) · 2.08 KB
/
Copy path.env.example
File metadata and controls
57 lines (49 loc) · 2.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Claude Code Slack Notifier Configuration
# Copy this file to .env and fill in your actual values
# Then source it: source .env
# ============================================================================
# OPTION 1: Direct Message Mode (Recommended)
# ============================================================================
# Send notifications as direct messages to your Slack account
# Requires: pip install slack-sdk
# Slack Bot User OAuth Token (starts with xoxb-)
# Get it from: https://api.slack.com/apps -> Your App -> OAuth & Permissions
SLACK_CLAUDE_CODE_BOT_TOKEN=xoxb-your-bot-token-here
# Your Slack Member ID (starts with U)
# Get it from: Click your profile in Slack -> Copy member ID
# Or use: https://api.slack.com/methods/users.list/test
SLACK_MEMBER_ID=U01234567
# ============================================================================
# OPTION 2: Webhook Mode
# ============================================================================
# Send notifications to a Slack channel via Incoming Webhooks
# No additional dependencies required
# Slack Incoming Webhook URL
# Get it from: https://api.slack.com/apps -> Your App -> Incoming Webhooks
SLACK_WEBHOOK_URL=https://hooks.slack.com/services/YOUR/WEBHOOK/URL
# ============================================================================
# Usage Instructions
# ============================================================================
#
# 1. Copy this file:
# cp .env.example .env
#
# 2. Edit .env and fill in your actual values
#
# 3. Load environment variables:
# source .env
#
# 4. Or add to your shell profile (~/.bashrc or ~/.zshrc):
# export SLACK_CLAUDE_CODE_BOT_TOKEN="xoxb-..."
# export SLACK_MEMBER_ID="U..."
# # OR
# export SLACK_WEBHOOK_URL="https://hooks.slack.com/..."
#
# 5. Test the configuration:
# # For DM mode:
# echo '{}' | python3 ~/bin/claude_slack_notifier.py --event-type stop --mode dm
#
# # For Webhook mode:
# echo '{}' | python3 ~/bin/claude_slack_notifier.py --event-type stop --mode webhook
#
# ============================================================================