Claude Code
in Discord
Discord bot that manages Claude Code sessions via tmux. Each session gets its own channel.
What it does
Bridges Discord to Claude Code via persistent tmux sessions
Channel per Session
Each Claude session gets its own Discord channel. Organize multiple projects, keep conversations separate.
Just Type
No commands needed. Messages go straight to Claude. Responses stream back in real-time with ANSI colors.
Persistent Sessions
Sessions run in tmux. Survive disconnects, bot restarts, everything. Pick up where you left off.
Terminal Access
Drop into the terminal anytime with tmux attach. Full access to the same session.
Interactive Prompts
When Claude shows numbered options, clickable buttons appear. Select without typing.
Secure by Default
User whitelist ensures only you can run commands. Your machine, your rules.
Simple Architecture
Discord messages flow through to Claude Code running in tmux
Installation
Prerequisites
brew install tmux
Create Discord Application
- Go to Discord Developer Portal
- Click "New Application" and name it
- Go to Bot tab → Click "Reset Token" → Copy and save it
- Enable Message Content Intent under Privileged Gateway Intents
- Go to OAuth2 → URL Generator
Scopes: bot, applications.commands
Bot Permissions: Send Messages, Manage Channels, Embed Links, Add Reactions, Read Message History
Open the generated URL to invite the bot to your server
Clone & Configure
git clone https://github.com/disclaude/app
cd app
Create a .env file with your configuration:
# Required: Discord Bot Token
DISCORD_TOKEN=your_bot_token_here
# Required: Discord Application Client ID
DISCORD_CLIENT_ID=your_client_id_here
# Required: Guild/Server ID
DISCORD_GUILD_ID=your_guild_id_here
# Highly Recommended: Allowed Discord user IDs
ALLOWED_USERS=123456789012345678
# Optional: Default working directory
DEFAULT_DIRECTORY=/path/to/your/projects
Always set ALLOWED_USERS - this bot can execute code on your machine. Only whitelisted
users should have access.
- Open Discord Settings → Advanced → Enable Developer Mode
- Server ID: Right-click server icon → Copy Server ID
- User ID: Right-click your username → Copy User ID
- Client ID: Discord Developer Portal → Your App → OAuth2
Install & Run
npm install
npm start
For development with hot reload:
npm run dev
Create Your First Session
/claude new myproject ~/Dev/my-project
A new channel #claude-myproject will be created. Just type in it to talk
to Claude!
Commands
| Command | Description |
|---|---|
/claude new <name> [directory] |
Create a new session + channel |
/claude list |
List all active sessions |
/claude sync |
Reconnect orphaned tmux sessions |
/claude end |
End the session (run in session channel) |
/claude output [lines] |
Dump recent output |
/claude attach |
Get the tmux attach command |