Works on all platforms with Docker installed.
git clone https://github.com/zebbern/claude-code-discord.git
cd claude-code-discord
cp .env.example .env
# Edit .env with your DISCORD_TOKEN and APPLICATION_ID
docker compose up -dSee Docker Guide for full Docker usage, GHCR images, and auto-updates.
git clone https://github.com/zebbern/claude-code-discord.git
cd claude-code-discord
chmod +x setup.sh && ./setup.shgit clone https://github.com/zebbern/claude-code-discord.git
cd claude-code-discord
.\setup.ps1The setup script handles:
- Installing Deno (if not found)
- Installing Claude CLI (if not found)
- Creating
.envwith your tokens - Initializing git repo (if needed)
- Offering to start the bot
Linux / macOS:
curl -fsSL https://deno.land/install.sh | shWindows (PowerShell):
irm https://deno.land/install.ps1 | iexOr download from deno.com.
Requires Node.js / npm:
npm install -g @anthropic-ai/claude-code
claude /logingit clone https://github.com/zebbern/claude-code-discord.git
cd claude-code-discord
cp .env.example .envEdit .env with your DISCORD_TOKEN and APPLICATION_ID. See Configuration below.
Linux / macOS:
deno task startWindows (PowerShell):
deno task startDevelopment mode (hot reload):
deno task devWith optional flags:
deno run --allow-all index.ts --category myproject --user-id YOUR_DISCORD_IDIf you get
not a git directory, rungit initin the project folder first.
# Required
DISCORD_TOKEN=your_bot_token_here
APPLICATION_ID=your_application_id_here
# Optional
ANTHROPIC_API_KEY=your_anthropic_api_key_here # Only needed if not using `claude` CLI for auth
USER_ID=your_discord_user_id # Get mentioned when Claude finishes
CATEGORY_NAME=claude-code # Discord category for channels
WORK_DIR=/path/to/project # Working directory (default: current)
# Channel Monitoring (optional)
MONITOR_CHANNEL_ID=123456789012345678 # Channel to watch for alerts
MONITOR_BOT_IDS=987654321,111111111 # Bot/webhook user IDs to respond toEnvironment variables override .env file settings. CLI flags override environment variables.
- Deno and Claude CLI install via shell one-liners
- Use
chmod +x setup.shbefore running the setup script cpworks natively for.env.example
- Run PowerShell as Administrator if Deno install requires it
- Use
copy .env.example .envinstead ofcpif not using Git Bash - The setup script (
setup.ps1) handles Windows-specific paths automatically
- Docker Desktop required on Windows/macOS, Docker Engine on Linux
- The image bundles Deno and Git so no local installs needed
- See Docker Guide for volumes, GHCR, and Watchtower