by onikan27
Real-time dashboard for monitoring multiple Claude Code sessions. CLI + Mobile Web UI with QR code access, terminal focus switching (iTerm2, Terminal.app, Ghostty). macOS only.
# Add to your Claude Code skills
git clone https://github.com/onikan27/claude-code-monitorMonitor multiple Claude Code sessions in real-time from your terminal or smartphone.
Monitor sessions with keyboard navigation
Control from your phone (same Wi-Fi or Tailscale)
| Terminal (TUI) | Mobile Web | |----------------|------------| | Real-time session monitoring | Monitor from your smartphone | | Quick tab focus with keyboard | Remote terminal focus | | Vim-style navigation | Send messages to terminal | | Simple status display | Permission prompt navigation | | | Screen capture with pinch zoom |
ccm for automatic setup and launchNote: This tool is macOS only due to its use of AppleScript for terminal control.
No comments yet. Be the first to share your thoughts!
npx claude-code-monitor
npm install -g claude-code-monitor
ccm
On first run, it automatically sets up hooks and launches the monitor.
h to show QR code (default port: 3456)If port 3456 is in use, an available port is automatically selected.
Access from anywhere using Tailscale (secure VPN).
Prerequisites:
# Start with Tailscale IP
npx claude-code-monitor -t
# Or if installed globally
ccm -t
With -t option, the QR code URL uses your Tailscale IP (100.x.x.x), allowing access from any device in your Tailnet - even outside your local network.
Security: Tailscale uses WireGuard encryption. Communication is secure even over public networks.
| Command | Alias | Description |
|---------|-------|-------------|
| ccm | - | Launch monitor (auto-setup if needed) |
| ccm watch | ccm w | Launch monitor |
| ccm serve | ccm s | Start mobile web server only |
| ccm setup | - | Configure Claude Code hooks |
| ccm list | ccm ls | List sessions |
| ccm clear | - | Clear all sessions |
| Option | Description |
|--------|-------------|
| --qr | Show QR code on startup |
| -t, --tailscale | Prefer Tailscale IP for mobile access |
| -p, --port <port> | Specify port (serve command only) |
| Key | Action |
|-----|--------|
| β / k | Move up |
| β / j | Move down |
| Enter / f | Focus selected session |
| 1-9 | Quick select & focus |
| h | Show/Hide QR code |
| c | Clear all sessions |
| q / Esc | Quit |
| Icon | Status | Description |
|------|--------|-------------|
| β | Running | Claude Code is processing |
| β | Waiting | Waiting for user input |
| β | Done | Session ended |
Monitor and control Claude Code sessions from your smartphone.
Important: Your smartphone and Mac must be on the same Wi-Fi network (or use Tailscale with
-toption for remote access).
Recommended networks:
Warning: Avoid using on public Wi-Fi networks (cafes, airports, etc.). Other users on the same network could potentially access your monitor.
| Terminal | Focus Support | Notes | |----------|--------------|-------| | iTerm2 | β Full | TTY-based window/tab targeting | | Terminal.app | β Full | TTY-based window/tab targeting | | Ghostty | β Full | Title-based window targeting via Window menu |
Other terminals can use monitoring, but focus feature is not supported.
For reliable focus functionality with multiple tabs, ccm or ccm setup will prompt you to add the following setting:
// ~/.claude/settings.json
{
"env": {
"CLAUDE_CODE_DISABLE_TERMINAL_TITLE": "1"
}
}
This prevents Claude Code from overwriting terminal titles, which is necessary for tab identification in Ghostty.
If you skipped this during setup and want to enable it later, add the setting manually or delete CLAUDE_CODE_MONITOR_GHOSTTY_ASKED from your settings and run ccm again.
ccm setup to verify hook configuration~/.claude/settings.json for hook settingsccm clear
Warning: Without Tailscale, this tool is designed for use on trusted private networks only.
Never use on public Wi-Fi (cafes, airports, hotels, co-working spaces, etc.) without Tailscale. Other users on the same network could potentially intercept the authentication token and gain control of your terminal sessions, including the ability to execute arbitrary commands.
~/.claude/settings.jsonFor secure access from outside your local network, use the -t (Tailscale) option:
| Mode | Network | Security |
|------|---------|----------|
| Default | Same Wi-Fi only | Home/Office Wi-Fi recommended |
| -t (Tailscale) | Anywhere in Tailnet | WireGuard encrypted, safe on any network |
With Tailscale, communication is encrypted end-to-end, making it safe to use even on public Wi-Fi (cafes, airports, etc.).
import { getSessions, focusSession } from 'claude-code-monitor';
const sessions = getSessions();
if (sessions[0]?.tty) {
focusSession(sessions[0].tty);
}
This is an unofficial community tool and is not affiliated with Anthropic. "Claude" and "Claude Code" are trademarks of Anthropic.
Found a bug? Open an issue
Contributions are welcome! Please open an issue or submit a PR.
See CHANGELOG.md for details.
MIT