2025-07-27 22:59:51 +08:00
# Claude Code Remote
2025-07-27 02:22:12 +08:00
2025-08-02 04:21:26 +08:00
Control [Claude Code ](https://claude.ai/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:**
- 📧 **Email** - Traditional SMTP/IMAP integration with execution trace
- 📱 **Telegram** - Interactive bot with smart buttons ✅ **NEW**
- 💬 **LINE** - Rich messaging with token-based commands
- 🖥️ **Desktop** - Sound alerts and system notifications
2025-07-27 02:22:12 +08:00
2025-07-28 01:22:06 +08:00
< div align = "center" >
### 🎥 Watch Demo Video
2025-07-28 01:23:51 +08:00
< a href = "https://youtu.be/_yrNlDYOJhw" >
2025-08-01 13:31:54 +08:00
< img src = "./assets/CCRemote_demo.png" alt = "Claude Code Remote Demo" width = "100%" >
2025-07-28 01:23:51 +08:00
< br >
< img src = "https://img.shields.io/badge/▶-Watch%20on%20YouTube-red?style=for-the-badge&logo=youtube" alt = "Watch on YouTube" >
< / a >
2025-07-28 01:22:06 +08:00
< / div >
2025-07-28 01:19:08 +08:00
2025-07-27 22:59:51 +08:00
> 🐦 Follow [@Jiaxi_Cui](https://x.com/Jiaxi_Cui) for updates and AI development insights
2025-07-27 02:22:12 +08:00
2025-07-27 22:59:51 +08:00
## ✨ Features
2025-07-27 02:22:12 +08:00
2025-08-02 04:21:26 +08:00
- **📧 Multiple Messaging Platforms**:
2025-08-02 04:22:36 +08:00
- Email notifications with full execution trace and reply-to-send commands 
- Telegram Bot with interactive buttons and slash commands 
2025-08-02 04:21:26 +08:00
- LINE messaging with token-based commands
- Desktop notifications with sound alerts
- **🔄 Two-way Control**: Reply to messages or emails to send new commands
- **📱 Remote Access**: Control Claude from anywhere
- **🔒 Secure**: ID-based whitelist verification for all platforms
- **👥 Group Support**: Use in LINE groups or Telegram groups for team collaboration
- **🤖 Smart Commands**: Intuitive command formats for each platform
2025-07-27 22:59:51 +08:00
- **📋 Multi-line Support**: Send complex commands with formatting
2025-08-02 04:21:26 +08:00
- **⚡ Smart Monitoring**: Intelligent detection of Claude responses with historical tracking
- **🔄 tmux Integration**: Seamless command injection into active tmux sessions
- **📊 Execution Trace**: Full terminal output capture in email notifications
2025-07-27 02:22:12 +08:00
2025-08-01 13:31:54 +08:00
## 📅 Changelog
2025-08-01 16:36:33 +08:00
### August 2025
2025-08-02 04:28:24 +08:00
- **2025-08-02**: Add full execution trace to email notifications ([#14](https://github.com/JessyTsui/Claude-Code-Remote/pull/14) by [@vaclisinc ](https://github.com/vaclisinc ))
- **2025-08-01**: Enhanced Multi-Channel Notification System ([#1](https://github.com/JessyTsui/Claude-Code-Remote/pull/1) by [@laihenyi ](https://github.com/laihenyi ) [@JessyTsui ](https://github.com/JessyTsui ))
2025-08-02 04:21:26 +08:00
- ✅ **Telegram Integration Completed** - Interactive buttons, real-time commands, smart personal/group chat handling
- ✅ **Multi-Channel Notifications** - Simultaneous delivery to Desktop, Telegram, Email, LINE
- ✅ **Smart Sound Alerts** - Always-on audio feedback with customizable sounds
- ✅ **Intelligent Session Management** - Auto-detection, real conversation content, 24-hour tokens
2025-08-02 04:28:24 +08:00
- **2025-08-01**: Fix #9 #12: Add configuration to disable subagent notifications ([#10](https://github.com/JessyTsui/Claude-Code-Remote/pull/10) by [@vaclisinc ](https://github.com/vaclisinc ))
2025-08-01 14:49:48 +08:00
- **2025-08-01**: Implement terminal-style UI for email notifications ([#8](https://github.com/JessyTsui/Claude-Code-Remote/pull/8) by [@vaclisinc ](https://github.com/vaclisinc ))
- **2025-08-01**: Fix working directory issue - enable claude-remote to run from any directory ([#7](https://github.com/JessyTsui/Claude-Code-Remote/pull/7) by [@vaclisinc ](https://github.com/vaclisinc ))
2025-08-02 04:21:26 +08:00
2025-08-01 13:31:54 +08:00
### July 2025
2025-08-01 16:36:33 +08:00
- **2025-07-31**: Fix self-reply loop issue when using same email for send/receive ([#4](https://github.com/JessyTsui/Claude-Code-Remote/pull/4) by [@vaclisinc ](https://github.com/vaclisinc ))
2025-08-01 13:31:54 +08:00
- **2025-07-28**: Remove hardcoded values and implement environment-based configuration ([#2](https://github.com/JessyTsui/Claude-Code-Remote/pull/2) by [@kevinsslin ](https://github.com/kevinsslin ))
## 📋 TODO List
### Notification Channels
2025-08-02 04:21:26 +08:00
- ~~**📱 Telegram Integration**~~ ✅ **COMPLETED** - Bot integration with interactive buttons and real-time commands
- **💬 Discord Integration** - Bot integration for messaging platforms
- **⚡ Slack Workflow** - Native Slack app with slash commands
2025-08-01 13:31:54 +08:00
### Developer Tools
2025-08-02 04:21:26 +08:00
- **🤖 AI Tools Support** - Integration with Gemini CLI, Cursor, and other AI development tools
- **🔀 Git Automation** - Auto-commit functionality, PR creation, branch management
2025-08-01 13:31:54 +08:00
### Usage Analytics
2025-08-02 04:21:26 +08:00
- **💰 Cost Tracking** - Token usage monitoring and estimated costs
- **⚡ Performance Metrics** - Execution time tracking and resource usage analysis
- **📧 Scheduled Reports** - Daily/weekly usage summaries delivered via email
2025-08-01 13:31:54 +08:00
### Native Apps
2025-08-02 04:21:26 +08:00
- **📱 Mobile Apps** - iOS and Android applications for remote Claude control
- **🖥️ Desktop Apps** - macOS and Windows native clients with system integration
2025-08-01 13:31:54 +08:00
2025-08-02 04:21:26 +08:00
## 🚀 Quick Start
2025-08-01 13:31:54 +08:00
2025-08-02 04:21:26 +08:00
### 1. Prerequisites
2025-08-01 13:31:54 +08:00
2025-08-02 04:21:26 +08:00
**System Requirements:**
- Node.js >= 14.0.0
- **tmux** (required for command injection)
- Active tmux session with Claude Code running
2025-08-01 13:31:54 +08:00
2025-08-02 04:21:26 +08:00
### 2. Install
2025-07-27 02:22:12 +08:00
```bash
2025-07-27 22:33:32 +08:00
git clone https://github.com/JessyTsui/Claude-Code-Remote.git
cd Claude-Code-Remote
2025-07-27 15:27:24 +08:00
npm install
2025-07-27 22:28:44 +08:00
```
2025-08-02 04:21:26 +08:00
### 3. Choose Your Platform
#### Option A: Configure Email (Recommended for Beginners)
2025-07-27 22:28:44 +08:00
2025-07-27 22:33:32 +08:00
```bash
2025-08-02 04:21:26 +08:00
# Copy example config
2025-07-27 22:47:34 +08:00
cp .env.example .env
2025-08-02 04:21:26 +08:00
# Edit with your email credentials
nano .env
2025-07-27 22:47:34 +08:00
```
2025-08-02 04:21:26 +08:00
**Required email settings:**
2025-07-27 22:28:44 +08:00
```env
2025-08-02 04:21:26 +08:00
EMAIL_ENABLED=true
2025-07-27 22:33:32 +08:00
SMTP_USER=your-email@gmail.com
2025-08-02 04:21:26 +08:00
SMTP_PASS=your-app-password
2025-07-27 22:47:34 +08:00
IMAP_USER=your-email@gmail.com
2025-07-27 22:28:44 +08:00
IMAP_PASS=your-app-password
2025-07-27 22:33:32 +08:00
EMAIL_TO=your-notification-email@gmail.com
ALLOWED_SENDERS=your-notification-email@gmail.com
2025-08-02 04:21:26 +08:00
SESSION_MAP_PATH=/your/path/to/Claude-Code-Remote/src/data/session-map.json
2025-07-27 02:22:12 +08:00
```
2025-08-02 04:21:26 +08:00
📌 **Gmail users** : Use [App Passwords ](https://myaccount.google.com/security ), not your regular password.
2025-08-01 13:31:54 +08:00
2025-08-02 04:21:26 +08:00
#### Option B: Configure Telegram ✅ **NEW**
2025-07-27 22:28:44 +08:00
2025-08-02 04:21:26 +08:00
**Quick Setup:**
2025-08-01 13:31:54 +08:00
```bash
2025-08-02 04:21:26 +08:00
chmod +x setup-telegram.sh
./setup-telegram.sh
```
**Manual Setup:**
1. Create bot via [@BotFather ](https://t.me/BotFather )
2. Get your Chat ID from bot API
3. Configure webhook URL (use ngrok for local testing)
2025-08-01 13:31:54 +08:00
2025-08-02 04:21:26 +08:00
**Required Telegram settings:**
```env
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
2025-08-01 13:31:54 +08:00
```
2025-08-02 04:21:26 +08:00
#### Option C: Configure LINE
**Required LINE settings:**
```env
LINE_ENABLED=true
LINE_CHANNEL_ACCESS_TOKEN=your-token
LINE_CHANNEL_SECRET=your-secret
LINE_USER_ID=your-user-id
```
### 4. Configure Claude Code Hooks
Create hooks configuration file:
2025-07-27 22:28:44 +08:00
2025-08-02 04:21:26 +08:00
**Method 1: Global Configuration (Recommended)**
```bash
# Add to ~/.claude/settings.json
2025-07-27 22:28:44 +08:00
{
"hooks": {
"Stop": [{
"matcher": "*",
"hooks": [{
"type": "command",
2025-08-02 04:21:26 +08:00
"command": "node /your/path/to/Claude-Code-Remote/claude-hook-notify.js completed",
2025-07-27 22:28:44 +08:00
"timeout": 5
}]
}],
"SubagentStop": [{
"matcher": "*",
"hooks": [{
"type": "command",
2025-08-02 04:21:26 +08:00
"command": "node /your/path/to/Claude-Code-Remote/claude-hook-notify.js waiting",
2025-07-27 22:28:44 +08:00
"timeout": 5
}]
}]
}
}
```
2025-08-02 04:21:26 +08:00
**Method 2: Project-Specific Configuration**
```bash
# Set environment variable
export CLAUDE_HOOKS_CONFIG=/your/path/to/Claude-Code-Remote/claude-hooks.json
```
2025-08-01 14:49:48 +08:00
> **Note**: Subagent notifications are disabled by default. To enable them, set `enableSubagentNotifications: true` in your config. See [Subagent Notifications Guide](./docs/SUBAGENT_NOTIFICATIONS.md) for details.
2025-08-02 04:21:26 +08:00
### 5. Start Services
2025-08-01 13:31:54 +08:00
2025-08-02 04:21:26 +08:00
#### For All Platforms (Recommended)
2025-08-01 13:31:54 +08:00
```bash
2025-08-02 04:21:26 +08:00
# Automatically starts all enabled platforms
npm run webhooks
# or
node start-all-webhooks.js
2025-08-01 13:31:54 +08:00
```
2025-08-02 04:21:26 +08:00
#### For Individual Platforms
2025-07-27 22:28:44 +08:00
2025-08-02 04:21:26 +08:00
**For Email:**
2025-07-27 22:28:44 +08:00
```bash
2025-08-02 04:21:26 +08:00
npm run daemon:start
# or
node claude-remote.js daemon start
2025-08-01 13:31:54 +08:00
```
2025-07-27 22:33:32 +08:00
2025-08-02 04:21:26 +08:00
**For Telegram:**
```bash
npm run telegram
# or
node start-telegram-webhook.js
2025-08-01 13:31:54 +08:00
```
2025-08-02 04:21:26 +08:00
**For LINE:**
2025-08-01 13:31:54 +08:00
```bash
2025-08-02 04:21:26 +08:00
npm run line
# or
node start-line-webhook.js
2025-07-27 22:28:44 +08:00
```
2025-08-02 04:21:26 +08:00
### 6. Test Your Setup
2025-08-01 13:31:54 +08:00
2025-08-02 04:21:26 +08:00
**Quick Test:**
```bash
# Test all notification channels
node claude-hook-notify.js completed
# Should receive notifications via all enabled platforms
2025-08-01 13:31:54 +08:00
```
2025-07-28 14:56:41 +08:00
2025-08-02 04:21:26 +08:00
**Full Test:**
1. Start Claude in tmux session with hooks enabled
2. Run any command in Claude
3. Check for notifications (email/Telegram/LINE)
4. Reply with new command to test two-way control
2025-08-01 13:31:54 +08:00
2025-08-02 04:21:26 +08:00
## 🎮 How It Works
2025-08-01 13:31:54 +08:00
2025-08-02 04:21:26 +08:00
1. **Use Claude normally** in tmux session
2. **Get notifications** when Claude completes tasks via:
- 🔊 **Sound alert** (Desktop)
- 📧 **Email notification with execution trace** (if enabled)
- 📱 **Telegram message with buttons** (if enabled)
- 💬 **LINE message** (if enabled)
3. **Reply with commands** using any platform
4. **Commands execute automatically** in Claude
2025-07-27 22:28:44 +08:00
2025-08-02 04:21:26 +08:00
### Platform Command Formats
2025-07-27 22:28:44 +08:00
2025-08-02 04:21:26 +08:00
**Email:**
```
Simply reply to notification email with your command
No special formatting required
2025-07-27 02:22:12 +08:00
```
2025-08-02 04:21:26 +08:00
**Telegram:** ✅ **NEW**
2025-07-27 02:22:12 +08:00
```
2025-08-02 04:21:26 +08:00
Click smart button to get format:
📝 Personal Chat: /cmd TOKEN123 your command here
👥 Group Chat: @bot_name /cmd TOKEN123 your command here
2025-07-27 02:22:12 +08:00
```
2025-08-02 04:21:26 +08:00
**LINE:**
2025-08-01 13:31:54 +08:00
```
2025-08-02 04:21:26 +08:00
Reply to notification with: Your command here
(Token automatically extracted from conversation context)
2025-08-01 13:31:54 +08:00
```
Add full execution trace in email notifications (#11) (#14)
* Add configuration option to disable subagent notifications
- Added 'enableSubagentNotifications' config option (default: false)
- Modified notification handler to check config before sending subagent notifications
- Created documentation explaining the feature
- Updated README with note about subagent notifications
This addresses the issue where frequent subagent notifications can be distracting.
Users can now control whether they receive notifications when subagents stop/start.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Add subagent activity tracking in completion emails
- Track subagent activities instead of sending individual notifications
- Include subagent activity summary in completion emails
- Update email templates to display subagent activities
- Add SubagentTracker utility to manage activity tracking
- Update documentation to explain the new behavior
This provides a better user experience by:
1. Reducing notification noise from frequent subagent activities
2. Still providing full visibility into what subagents did
3. Consolidating all information in the completion email
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Improve subagent activity details and documentation
- Enhanced activity capture to include up to 1000 characters (was 200)
- Improved email display format with better visual separation
- Added detection for initialization-only captures with helpful message
- Added configuration option for activity detail level
- Created comprehensive documentation explaining the timing limitation
- Added visual indicators for processing status
This addresses the issue where subagent outputs were truncated or only
showed initialization messages. Users now get better visibility into
what subagents are doing, with clear indication when full output is
available in tmux.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* delete redundant files and modify README
* Fix HTML escaping in email notifications
- Add _escapeHtml function to properly escape HTML entities in emails
- Escape user-generated content to prevent HTML tags from being hidden
- Fix issue where <developer> and other HTML-like strings disappeared in emails
- Apply escaping to both main email content and subagent activity summaries
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Add full execution trace to email notifications
- Add getFullExecutionTrace method to capture complete terminal output
- Include execution trace in a scrollable section within emails
- Add CSS styling for visible scrollbars on desktop
- Clean trace output by removing command prompt boxes
- Add fallback message when trace is not available
This addresses issue #11 - providing transparency about task execution
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Redesign email notification UI with improved terminal aesthetics
- Reorganize content hierarchy: user request at top, response second, trace at bottom
- Preserve terminal-style commands ($ cat, $ claude-code execute, etc.)
- Remove redundant session info footer
- Implement smart execution trace capture from user input to completion
- Add TraceCapture utility to track user input timestamps
- Improve visual hierarchy while maintaining terminal aesthetics
- Use border colors (orange for user, green for success) for better distinction
- Make execution trace collapsible and de-emphasized
This improves readability while preserving the terminal charm of the project.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Fix execution trace filtering to show only recent activity
- Change filter logic to find LAST user input instead of first
- Search backwards through content to find most recent "> " prompt
- Only include content from that point forward
- Add fallback to show last 100 lines if no user input found
- This ensures trace shows only relevant recent execution, not entire history
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Remove duplicate content from execution trace
- Skip the first user input line (already shown in main content)
- Skip the last Claude response (already shown in main content)
- Only show intermediate execution steps and tool usage
- Clean up empty lines at beginning and end
- This avoids redundancy and focuses trace on execution details
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Fix execution trace to properly remove complete user input and output
- Track multi-line user input and skip all continuation lines
- Detect when user input ends (empty line or next command)
- Stop before the last Claude response to avoid truncation
- Only show intermediate execution steps between input and output
This ensures the trace shows the complete execution process without
duplicating content already displayed in the main sections.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Fix multi-line user input capture and trace filtering
- Capture complete multi-line user input (not just first line)
- Join continuation lines with spaces for proper display
- Preserve all execution details in trace (tool calls, outputs)
- Only skip user input and final response, keep everything in between
* Add configuration toggle for subagent activities in email
- Added 'showSubagentActivitiesInEmail' config option (default: false)
- Modified claude-remote.js to check config before including subagent activities
- Created documentation explaining the configuration
- Allows users to choose between concise emails (execution trace only) or detailed emails (both summaries)
This addresses the redundancy between execution trace and subagent activities summary,
giving users control over email content.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Fix Git merge conflict in email template and document subagent config
- Removed Git merge conflict markers from email text template
- Added documentation for showSubagentActivitiesInEmail config in README
- Explained that subagent activities are disabled by default for concise emails
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Update README changelog for PR #10 and issue #11
- Added entry for subagent notifications configuration (PR #10)
- Added entry for execution trace feature (issue #11)
- Maintained chronological order in changelog
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* delete redundant files
* fix #15: add local database into .gitignore
* Fix execution trace display in email notifications
- Remove collapsible details tag for better email client compatibility
- Add configuration option to toggle execution trace display
- Fix HTML escaping issue for executionTraceSection variable
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Remove data files from git tracking
These session-specific data files should not be tracked in version control
as they are machine-specific and cause issues when pulling on other machines.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix typo(?) in changelog (#13)
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Naich <an.naich@gmail.com>
Co-authored-by: JessyTsui <51992423+JessyTsui@users.noreply.github.com>
2025-08-02 04:07:34 +08:00
### Advanced Configuration
**Email Notification Options**
1. **Subagent Activities in Email**
By default, email notifications only show the execution trace. You can optionally enable a separate subagent activities summary section:
```json
// In your config/config.json
{
"showSubagentActivitiesInEmail": true // Default: false
}
```
When enabled, emails will include:
- **Subagent Activities Summary**: A structured list of all subagent activities
- **Full Execution Trace**: The complete terminal output
Since the execution trace already contains all information, this feature is disabled by default to keep emails concise.
2. **Execution Trace Display**
You can control whether to include the execution trace in email notifications:
```json
// In your email channel configuration
{
"email": {
"config": {
"includeExecutionTrace": false // Default: true
}
}
}
```
- When `true` (default): Shows a scrollable execution trace section in emails
- When `false` : Removes the execution trace section entirely from emails
This is useful if you find the execution trace too verbose or if your email client has issues with scrollable content.
2025-08-02 04:21:26 +08:00
## 💡 Use Cases
2025-07-27 22:28:44 +08:00
2025-08-02 04:21:26 +08:00
- **Remote Code Reviews**: Start reviews at office, continue from home via any platform
- **Long-running Tasks**: Monitor progress and guide next steps remotely
- **Multi-location Development**: Control Claude from anywhere without VPN
- **Team Collaboration**: Share Telegram groups for team notifications
- **Mobile Development**: Send commands from phone via Telegram
2025-08-01 13:31:54 +08:00
2025-08-02 04:21:26 +08:00
## 🔧 Commands
2025-07-27 22:28:44 +08:00
2025-08-02 04:21:26 +08:00
### Testing & Diagnostics
2025-07-27 02:22:12 +08:00
```bash
2025-08-02 04:21:26 +08:00
# 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
2025-07-27 22:28:44 +08:00
2025-08-02 04:21:26 +08:00
# System diagnostics
node claude-remote.js diagnose
2025-07-27 22:47:34 +08:00
node claude-remote.js status
2025-08-02 04:21:26 +08:00
node claude-remote.js test
```
2025-07-27 22:28:44 +08:00
2025-08-02 04:21:26 +08:00
### Service Management
```bash
# Start all enabled platforms
npm run webhooks
2025-08-01 13:31:54 +08:00
2025-08-02 04:21:26 +08:00
# 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
2025-07-27 02:22:12 +08:00
```
2025-07-27 22:59:51 +08:00
## 🔍 Troubleshooting
2025-07-27 22:28:44 +08:00
2025-08-02 04:21:26 +08:00
### Common Issues
**Not receiving notifications from Claude?**
1. Check hooks configuration in tmux session:
```bash
echo $CLAUDE_HOOKS_CONFIG
```
2. Verify Claude is running with hooks enabled
3. Test notification manually:
```bash
node claude-hook-notify.js completed
```
**Telegram bot not responding?** ✅ **NEW**
```bash
# 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?**
```bash
# Check tmux session exists
tmux list-sessions
# Verify injection mode
grep INJECTION_MODE .env # Should be 'tmux'
# Test injection
node test-injection.js
```
2025-08-01 13:31:54 +08:00
**Not receiving emails?**
- Run `node claude-remote.js test` to test email setup
- Check spam folder
- Verify SMTP settings in `.env`
- For Gmail: ensure you're using App Password
2025-07-27 22:28:44 +08:00
2025-08-02 04:21:26 +08:00
### Debug Mode
```bash
# Enable detailed logging
LOG_LEVEL=debug npm run webhooks
DEBUG=true node claude-hook-notify.js completed
```
2025-07-27 15:27:24 +08:00
2025-07-27 22:59:51 +08:00
## 🛡️ Security
2025-07-27 22:33:32 +08:00
2025-08-02 04:21:26 +08:00
### Multi-Platform Authentication
- ✅ **Email** : Sender whitelist via `ALLOWED_SENDERS` environment variable
- ✅ **Telegram** : Bot token and chat ID verification
- ✅ **LINE** : Channel secret and access token validation
- ✅ **Session Tokens** : 8-character alphanumeric tokens for command verification
### Session Security
- ✅ **Session Isolation** : Each token controls only its specific tmux session
- ✅ **Auto Expiration** : Sessions timeout automatically after 24 hours
- ✅ **Token-based Commands** : All platforms require valid session tokens
- ✅ **Minimal Data Storage** : Session files contain only necessary information
2025-07-27 15:27:24 +08:00
2025-07-27 22:59:51 +08:00
## 🤝 Contributing
2025-07-27 15:27:24 +08:00
2025-07-27 22:59:51 +08:00
Found a bug or have a feature request?
2025-07-27 02:22:12 +08:00
2025-07-27 22:59:51 +08:00
- 🐛 **Issues** : [GitHub Issues ](https://github.com/JessyTsui/Claude-Code-Remote/issues )
- 🐦 **Updates** : Follow [@Jiaxi_Cui ](https://x.com/Jiaxi_Cui ) on Twitter
- 💬 **Discussions** : Share your use cases and improvements
2025-07-27 02:22:12 +08:00
2025-07-27 22:59:51 +08:00
## 📄 License
2025-07-27 02:22:12 +08:00
2025-07-27 22:59:51 +08:00
MIT License - Feel free to use and modify!
2025-07-27 02:22:12 +08:00
---
2025-07-27 22:59:51 +08:00
**🚀 Make Claude Code truly remote and accessible from anywhere!**
2025-07-28 15:24:51 +08:00
## ⭐ Star History
[](https://star-history.com/#JessyTsui/Claude-Code-Remote& Date)
2025-07-27 22:59:51 +08:00
⭐ **Star this repo** if it helps you code more efficiently!
2025-07-27 02:22:12 +08:00
2025-08-02 04:22:36 +08:00
> 💡 **Tip**: Enable multiple notification channels for redundancy - never miss a Claude completion again!