Bridge Claude Code to Slack — Control your AI coding assistant from anywhere.
ClaudeWire turns Slack into a command center for Claude Code, Anthropic's agentic coding tool. Run coding tasks on a remote VM, stream output in real-time, and collaborate with your team — all from Slack.
- Remote Access: Run Claude Code on a powerful VM from your phone or any device with Slack
- Team Collaboration: Share coding sessions in Slack channels with threaded conversations
- Always On: Keep long-running tasks going without tying up your local machine
- Secure: User allowlisting, isolated project directories, and audit logging
- Private Sessions: Each user gets their own isolated Claude Code session
- Thread-Based Output: All output streams to Slack threads, keeping channels clean
- Real-Time Streaming: See Claude's work as it happens with debounced updates
- Full CLI Control: Accept/reject tool use, cancel operations, manage sessions
- Session Persistence: Redis for state, SQLite for history and audit logs
- Socket Mode: No public URLs needed — works behind firewalls
┌─────────────────────────────────────────────────────────────────────────────┐
│ Your VM │
│ │
│ ┌─────────────────────┐ ┌─────────────────────┐ │
│ │ ClaudeWire │────▶│ Redis │ │
│ │ (Node.js) │ │ (Session State) │ │
│ │ │ └─────────────────────┘ │
│ │ • Slack Bot │ ┌─────────────────────┐ │
│ │ • Session Manager │ │ SQLite │ │
│ │ • Output Streamer │ │ (History/Logs) │ │
│ └──────────┬──────────┘ └─────────────────────┘ │
│ │ spawns │
│ ▼ │
│ ┌─────────────────────┐ ┌─────────────────────┐ │
│ │ Claude Code (PTY) │────▶│ /projects/{user} │ │
│ │ One per user │ │ Isolated dirs │ │
│ └─────────────────────┘ └─────────────────────┘ │
│ │
└──────────────────────────────────┬──────────────────────────────────────────┘
│ WebSocket (outbound)
▼
┌─────────────────┐
│ Slack API │
└─────────────────┘
- Node.js 20+
- Redis
- Claude Code CLI installed and authenticated
- Slack workspace with admin access
- Go to api.slack.com/apps and create a new app
- Enable Socket Mode in Settings → Socket Mode
- Add these Bot Token Scopes under OAuth & Permissions:
app_mentions:readchat:writeim:historyim:readim:writeusers:read
- Enable Events and subscribe to:
app_mentionmessage.im
- Add a Slash Command:
/claude - Install the app to your workspace
- Copy your tokens:
- Bot User OAuth Token (
xoxb-...) - Signing Secret
- App-Level Token (
xapp-...) — generate one withconnections:writescope
- Bot User OAuth Token (
git clone https://github.com/your-org/claudewire.git
cd claudewire
npm installcp .env.example .envEdit .env:
# Slack (required)
SLACK_BOT_TOKEN=xoxb-your-bot-token
SLACK_SIGNING_SECRET=your-signing-secret
SLACK_APP_TOKEN=xapp-your-app-token
# Authorization (required) - Slack user IDs
ALLOWED_USER_IDS=U01234567,U89012345
ADMIN_USER_IDS=U01234567
# Optional settings
PROJECTS_DIR=./projects
SESSION_TIMEOUT_MINUTES=60
LOG_LEVEL=infoTip: Find your Slack user ID by clicking your profile → More → Copy member ID
Development:
npm run devProduction with Docker:
docker-compose up -dJust DM the bot or mention it in a channel:
@ClaudeWire create a Python script that fetches weather data
ClaudeWire automatically creates a session and starts working.
Use these commands in chat (prefix with /):
| Command | Description |
|---|---|
/new [path] |
Start a new session (optionally in a specific directory) |
/stop |
End your current session |
/status |
Show session info |
/y or /accept |
Accept a tool use prompt |
/n or /reject |
Reject a tool use prompt |
/cancel |
Send Ctrl+C to cancel current operation |
/help |
Show all commands |
Use /claude for quick actions:
/claude status
/claude new /path/to/project
/claude stop
-
Start a session:
@ClaudeWire I need to build a REST API with Express -
Claude creates files and asks for permission:
Claude: I'll create the project structure. Allow Write tool? -
Approve with
/y:/y -
Continue the conversation in the thread:
Now add authentication with JWT -
When done:
/stop
| Variable | Default | Description |
|---|---|---|
SLACK_BOT_TOKEN |
(required) | Bot User OAuth Token |
SLACK_SIGNING_SECRET |
(required) | Signing Secret |
SLACK_APP_TOKEN |
(required) | App-Level Token for Socket Mode |
ALLOWED_USER_IDS |
[] |
Comma-separated Slack user IDs |
ADMIN_USER_IDS |
[] |
Admin user IDs |
ALLOW_ALL_USERS |
false |
Allow any user (not recommended) |
PROJECTS_DIR |
./projects |
Base directory for user projects |
MAX_SESSIONS_PER_USER |
1 |
Concurrent sessions per user |
SESSION_TIMEOUT_MINUTES |
60 |
Auto-terminate inactive sessions |
REDIS_URL |
redis://localhost:6379 |
Redis connection URL |
SQLITE_PATH |
./data/claudewire.db |
SQLite database path |
LOG_LEVEL |
info |
Logging level (debug, info, warn, error) |
src/
├── index.ts # Application entry point
├── config/ # Configuration with Zod validation
├── slack/ # Slack bot, handlers, commands
├── gateway/ # Authentication
├── session/ # Session lifecycle management
├── claude/ # Claude Code PTY wrapper
├── streaming/ # Output streaming to Slack
└── storage/ # Redis + SQLite clients
npm testnpm run buildnpm run typecheck# Build and start
docker-compose up -d
# View logs
docker-compose logs -f claudewire
# Stop
docker-compose down-
Build the application:
npm run build
-
Start Redis:
redis-server
-
Run the application:
NODE_ENV=production node dist/index.js
Create /etc/systemd/system/claudewire.service:
[Unit]
Description=ClaudeWire - Claude Code Slack Bridge
After=network.target redis.service
[Service]
Type=simple
User=claudewire
WorkingDirectory=/opt/claudewire
EnvironmentFile=/opt/claudewire/.env
ExecStart=/usr/bin/node dist/index.js
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target- User Allowlisting: Only explicitly authorized Slack users can interact with ClaudeWire
- Project Isolation: Each user's projects are stored in separate directories
- No Public Endpoints: Socket Mode means no inbound connections required
- Audit Logging: All sessions and messages are logged to SQLite
- Session Timeouts: Inactive sessions are automatically terminated
- Run ClaudeWire in a VM or container with limited permissions
- Use a dedicated service account for Claude Code
- Regularly review the SQLite audit logs
- Set restrictive
ALLOWED_USER_IDSrather thanALLOW_ALL_USERS
- Slack integration with Socket Mode
- Per-user private sessions
- Thread-based output streaming
- Session persistence (Redis + SQLite)
- WhatsApp integration
- Web dashboard for session management
- Multi-VM load balancing
- File upload/download via Slack
- Session sharing between users
Contributions are welcome! Please read our contributing guidelines before submitting a PR.
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
# Clone your fork
git clone https://github.com/YOUR_USERNAME/claudewire.git
cd claudewire
# Install dependencies
npm install
# Set up environment
cp .env.example .env
# Edit .env with your test Slack app credentials
# Run in development mode
npm run devMIT License - see LICENSE for details.
- Claude Code by Anthropic
- Slack Bolt for the excellent SDK
- node-pty for terminal emulation
Built with Claude Code