A community-driven registry for the Claude Code ecosystem. Not affiliated with Anthropic.
Are you the author? Sign in to claim
Control Claude Code remotely via email, Discord, and Telegram with notifications
Control Claude Code remotely via multiple messaging platforms. Start tasks locally, receive notifications when Claude completes them, and send new commands by simply replying to messages.
Supported Platforms:
🐦 Follow @Jiaxi_Cui for updates and AI development insights


System Requirements:
git clone https://github.com/JessyTsui/Claude-Code-Remote.git
cd Claude-Code-Remote
npm install
npm run setup
.env~/.claude/settings.json.env,见下方“手动配置”npm run setup)# Copy example config
cp .env.example .env
# Edit with your email credentials
nano .env
Required email settings:
EMAIL_ENABLED=true
SMTP_USER=your-email@gmail.com
SMTP_PASS=your-app-password
IMAP_USER=your-email@gmail.com
IMAP_PASS=your-app-password
EMAIL_TO=your-notification-email@gmail.com
ALLOWED_SENDERS=your-notification-email@gmail.com
SESSION_MAP_PATH=/your/path/to/Claude-Code-Remote/src/data/session-map.json
📌 Gmail users: Use App Passwords, not your regular password.
Quick Setup:
chmod +x setup-telegram.sh
./setup-telegram.sh
Manual Setup:
Required Telegram settings:
TELEGRAM_ENABLED=true
TELEGRAM_BOT_TOKEN=your-bot-token-here
TELEGRAM_CHAT_ID=your-chat-id-here
TELEGRAM_WEBHOOK_URL=https://your-ngrok-url.app
SESSION_MAP_PATH=/your/path/to/Claude-Code-Remote/src/data/session-map.json
Optional Telegram settings:
# Force IPv4 connections to Telegram API (default: false)
# Enable this if you experience connectivity issues with IPv6
TELEGRAM_FORCE_IPV4=true
Network Configuration Notes:
TELEGRAM_FORCE_IPV4=true:
Required LINE settings:
LINE_ENABLED=true
LINE_CHANNEL_ACCESS_TOKEN=your-token
LINE_CHANNEL_SECRET=your-secret
LINE_USER_ID=your-user-id
npm run setup 时需要)Create hooks configuration file:
Method 1: Global Configuration (Recommended)
# Add to ~/.claude/settings.json
{
"hooks": {
"Stop": [{
"matcher": "*",
"hooks": [{
"type": "command",
"command": "node /your/path/to/Claude-Code-Remote/claude-hook-notify.js completed",
"timeout": 5
}]
}],
"SubagentStop": [{
"matcher": "*",
"hooks": [{
"type": "command",
"command": "node /your/path/to/Claude-Code-Remote/claude-hook-notify.js waiting",
"timeout": 5
}]
}]
}
}
Method 2: Project-Specific Configuration
# Set environment variable
export CLAUDE_HOOKS_CONFIG=/your/path/to/Claude-Code-Remote/claude-hooks.json
Note: Subagent notifications are disabled by default. To enable them, set
enableSubagentNotifications: truein your config. See Subagent Notifications Guide for details.
claude-code --config /path/to/your/claude/settings.jsontmux new-session -d -s claude-session
tmux attach-session -t claude-session
claude-code --config /path/to/your/claude/settings.json
Detach: Ctrl+B 然后 D
Note: Interactive setup 已合并 hooks 到
~/.claude/settings.json。若跳过,请确保手动配置 hooks。
# Automatically starts all enabled platforms
npm run webhooks
# or
node start-all-webhooks.js
For Email:
npm run daemon:start
# or
node claude-remote.js daemon start
For Telegram:
npm run telegram
# or
node start-telegram-webhook.js
For LINE:
npm run line
# or
node start-line-webhook.js
Quick Test:
# Test all notification channels
node claude-hook-notify.js completed
# Should receive notifications via all enabled platforms
Full Test:
Email:
Simply reply to notification email with your command
No special formatting required
Telegram: ✅ NEW
Click smart button to get format:
📝 Personal Chat: /cmd TOKEN123 your command here
👥 Group Chat: @bot_name /cmd TOKEN123 your command here
LINE:
Reply to notification with: Your command here
(Token automatically extracted from conversation context)
Local fallback (no tmux)
INJECTION_MODE=pty:命令通过 PTY/智能粘贴注入,不依赖 tmuxEmail Notification Options
Subagent Activities in Email
By default, email notifications only show the execution trace. You can optionally enable a separate subagent activities summary section:
// In your config/config.json
{
"showSubagentActivitiesInEmail": true // Default: false
}
When enabled, emails will include:
Since the execution trace already contains all information, this feature is disabled by default to keep emails concise.
Execution Trace Display
You can control whether to include the execution trace in email notifications:
// In your email channel configuration
{
"email": {
"config": {
"includeExecutionTrace": false // Default: true
}
}
}
true (default): Shows a scrollable execution trace section in emailsfalse: Removes the execution trace section entirely from emailsThis is useful if you find the execution trace too verbose or if your email client has issues with scrollable content.
npm run setup # Interactive wizard to create .env and merge hooks into ~/.claude/settings.json
# Test all notification channels
node claude-hook-notify.js completed
# Test specific platforms
node test-telegram-notification.js
node test-real-notification.js
node test-injection.js
# System diagnostics
node claude-remote.js diagnose
node claude-remote.js status
node claude-remote.js test
# Start all enabled platforms
npm run webhooks
# Individual services
npm run telegram # Telegram webhook
npm run line # LINE webhook
npm run daemon:start # Email daemon
# Stop services
npm run daemon:stop # Stop email daemon
Not receiving notifications from Claude?
echo $CLAUDE_HOOKS_CONFIG
node claude-hook-notify.js completed
Telegram bot not responding? ✅ NEW
# Test bot connectivity
curl -X POST "https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/sendMessage" \
-H "Content-Type: application/json" \
-d "{\"chat_id\": $TELEGRAM_CHAT_ID, \"text\": \"Test\"}"
# Check webhook status
curl "https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/getWebhookInfo"
Commands not executing in Claude?
# Check tmux session exists
tmux list-sessions
# Verify injection mode
grep INJECTION_MODE .env # Should be 'tmux'
# Test injection
node test-injection.js
Not receiving emails?
node claude-remote.js test to test email setup.env# Enable detailed logging
LOG_LEVEL=debug npm run webhooks
DEBUG=true node claude-hook-notify.js completed
ALLOWED_SENDERS environment variableFound a bug or have a feature request?
MIT License - Feel free to use and modify!
🚀 Make Claude Code truly remote and accessible from anywhere!
⭐ Star this repo if it helps you code more efficiently!
💡 Tip: Enable multiple notification channels for redundancy - never miss a Claude completion again!
Give Claude Code memory that evolves with your codebase via hooks and LLM-compiled knowledge
Security hooks with SSRF protection, MCP compression, and OpenTelemetry tracing
Context management with hooks for state via ledgers, MCP without context pollution
An LLM council that reviews your coding agent's every move for quality assurance
Community Package
@JessyTsui on GitHub