Installation
August 1, 2026 ยท View on GitHub
Option 1: Docker (Recommended)
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: DISCORD_TOKEN, APPLICATION_ID, and ANTHROPIC_API_KEY (required in Docker)
docker compose up -d
See Docker Guide for full Docker usage, GHCR images, and auto-updates.
Option 2: Setup Script
Linux / macOS
git clone https://github.com/zebbern/claude-code-discord.git
cd claude-code-discord
chmod +x setup.sh && ./setup.sh
Windows (PowerShell)
git clone https://github.com/zebbern/claude-code-discord.git
cd claude-code-discord
.\setup.ps1
The 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
Option 3: Manual Setup
Install Deno
Linux / macOS:
curl -fsSL https://deno.land/install.sh | sh
Windows (PowerShell):
irm https://deno.land/install.ps1 | iex
Or download from deno.com.
Install Claude CLI
Requires Node.js / npm:
npm install -g @anthropic-ai/claude-code
claude /login
Clone and Configure
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. See Configuration below.
Start the Bot
Linux / macOS:
deno task start
Windows (PowerShell):
deno task start
Development mode (hot reload):
deno task dev
With optional flags:
deno run --allow-all index.ts --category myproject --user-id YOUR_DISCORD_ID
If you get
not a git directory, rungit initin the project folder first.
Configuration (.env)
# 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 to
Environment variables override .env file settings. CLI flags override environment variables.
Platform Notes
Linux / macOS
- Deno and Claude CLI install via shell one-liners
- Use
chmod +x setup.shbefore running the setup script cpworks natively for.env.example
Windows
- 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 (all platforms)
- 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