A shared terminal session for Claude Code - like tmux, but accessible via web browser and mobile.
Multiple clients (terminal + webapp) can connect to the same Claude Code session and see/interact with it in real-time.
- Shared PTY Session: Real Claude Code running in a pseudo-terminal
- Web Interface: Access from any browser with full terminal emulation (xterm.js)
- Terminal Attach: Connect from multiple terminals like tmux
- Real-time Sync: All clients see the same session simultaneously
- Remote Access: Use ngrok to access from anywhere
- Multiple Sessions: Run multiple Claude sessions and switch between them
- Mobile Support: Mobile-friendly UI with touch controls
- Push Notifications: Get notified when Claude needs your attention
# Install globally (one time)
ln -sf /path/to/teleclaude/teleclaude /usr/local/bin/teleclaude
# Start TeleClaude - launches server and attaches to Claude Code
teleclaude start
# Start with password protection (recommended for remote access)
teleclaude start -P mysecretpassword
# Start with Claude args (e.g., resume last conversation)
teleclaude start -- --resume
# Detach with Ctrl+] (server keeps running in background)
# Reattach anytime:
teleclaude attach
# Create additional sessions on running server
teleclaude new -s myproject ~/myproject
teleclaude new -s api ~/api -- --resume
# List sessions
teleclaude sessions
# Attach to specific session
teleclaude attach -s myproject
# Stop the server
teleclaude stop| Command | Description |
|---|---|
teleclaude start [dir] |
Start server and attach to Claude Code |
teleclaude start -- --resume |
Start with --resume flag |
teleclaude new -s NAME [dir] |
Create new session on running server |
teleclaude attach |
Attach to session from terminal |
teleclaude attach -s NAME |
Attach to specific session |
teleclaude sessions |
List all running sessions |
teleclaude status |
Show server status |
teleclaude url |
Show ngrok URL |
teleclaude stop |
Stop the server |
Detach: Press Ctrl+] to detach without stopping the session or server.
| Option | Description |
|---|---|
-s, --session NAME |
Session name (default: 'default') |
-p, --port PORT |
Port number (default: 8765) |
-P, --password PWD |
Password protect the server |
-- [args] |
Pass arguments to Claude Code |
TeleClaude can notify you when Claude needs your attention (asking questions, waiting for confirmation, etc.)
- Open TeleClaude in your mobile browser
- Tap the π button in the header
- Allow notifications when prompted
- The button changes to π when enabled
- You'll get notifications when Claude needs input (even if the tab is in background)
ntfy.sh sends real push notifications to your phone, even when the browser is closed.
Setup:
-
Install ntfy app on your phone:
- iOS: App Store
- Android: Play Store
-
Subscribe to a topic:
- Open the ntfy app
- Tap + to add a subscription
- Enter a unique topic name, e.g.,
teleclaude-john-secret123 - (Keep it private - anyone with the topic name can send you notifications)
-
Configure TeleClaude:
- Open TeleClaude in your browser
- Tap the π± button in the header
- Enter the SAME topic name:
teleclaude-john-secret123 - Click OK
-
Test it:
# Send a test notification curl -d "Test from TeleClaude" https://ntfy.sh/teleclaude-john-secret123
How it works:
- TeleClaude monitors Claude's output for patterns like
?,[Y/n],proceed? - When Claude appears to be waiting for input, a notification is sent
- Notifications only fire when the browser tab is NOT focused
βββββββββββββββββββββββββββ
β Claude Code (PTY) β
β Running in session β
βββββββββββββ¬ββββββββββββββ
β
βββββββββββββ΄ββββββββββββββ
β Session Manager β
β (broadcasts I/O) β
βββββββββββββ¬ββββββββββββββ
βββββββββββββββββΌββββββββββββββββ
β β β
Web Browser Terminal #1 Terminal #2
(xterm.js) (attach) (attach)
β
Push Notifications
(ntfy.sh / Browser)
# Clone or navigate to the project
cd teleclaude
# Create virtual environment
python3 -m venv venv
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Make CLI globally available
ln -sf $(pwd)/teleclaude /usr/local/bin/teleclaude
# Optional: Install ngrok for remote access
brew install ngrok # macOSThe web interface provides:
- Full terminal emulation with xterm.js
- Session selector to switch between sessions
- Mobile toolbar with arrow keys, Esc, Tab, etc.
- Notification buttons: π (browser) and π± (ntfy.sh)
- Attach info with terminal attach instructions
- Restart Session button
On mobile devices, a toolbar appears at the bottom with:
| Button | Function |
|---|---|
| βScr / βScr | Scroll terminal history |
| Esc | Escape key |
| Tab | Tab key |
| β² βΌ β βΆ | Arrow keys (for Claude prompts) |
| ^C | Ctrl+C |
| β | Enter |
Connect to a running session from any terminal:
# Attach to default session
teleclaude attach
# Attach to specific session
teleclaude attach -s myproject
# Attach to remote server
teleclaude attach https://xxxx.ngrok-free.appDetach: Press Ctrl+] to detach without stopping the session.
| Variable | Default | Description |
|---|---|---|
TELECLAUDE_HOME |
Script location | TeleClaude installation directory |
TELECLAUDE_PORT |
8765 | Server port |
TELECLAUDE_PASSWORD |
(none) | Password for server authentication |
- Create account at https://ngrok.com
- Get your auth token from the dashboard
- Configure ngrok:
ngrok config add-authtoken YOUR_TOKEN
teleclaude/
βββ server/
β βββ __init__.py
β βββ main.py # FastAPI server
β βββ pty_session.py # PTY session manager
β βββ attach.py # Terminal attach client
β βββ static/
β βββ index.html # Web UI
βββ teleclaude # CLI script
βββ requirements.txt
βββ README.md
- Browser notifications: Make sure you allowed notifications when prompted
- ntfy.sh: Verify the topic name matches exactly in both the app and TeleClaude
- Test ntfy directly:
curl -d "test" https://ntfy.sh/your-topic
- Buttons hidden by Dynamic Island: The UI should auto-adjust; try refreshing
- Keyboard covers input: Use the mobile toolbar buttons instead
- Check if the server is running:
teleclaude status - Check server logs for errors
- Try accessing localhost directly instead of ngrok
- Ensure websockets package is installed:
pip install websockets - Use
Ctrl+]to detach (notCtrl+C)
TeleClaude supports password protection to secure your terminal session:
# Start with password protection
teleclaude start -P mysecretpassword
# Attach with password (will prompt if needed)
teleclaude attach -P mysecretpassword
# Or set via environment variable
export TELECLAUDE_PASSWORD=mysecretpassword
teleclaude attachWhen password protection is enabled:
- Web UI shows a login prompt before accessing the terminal
- Terminal attach prompts for password if not provided
- All API endpoints and WebSocket connections require authentication
- Authentication tokens are stored in HTTP-only cookies (web) or passed via query parameter (attach)
- Always use password protection when exposing via ngrok or any remote access
- Keep your ntfy.sh topic name private
- Use a strong, unique password
- Consider using ngrok's additional authentication features for extra security
MIT