{"_id":"@arismag/claude-code-monitor","_rev":"2-0d54582201aa3c90b519dbdf4a9e3035","name":"@arismag/claude-code-monitor","dist-tags":{"latest":"1.4.0"},"versions":{"1.3.1":{"name":"@arismag/claude-code-monitor","version":"1.3.1","keywords":["claude","claude-code","anthropic","monitor","cli","tui","terminal","session"],"author":{"name":"onikan27"},"license":"MIT","_id":"@arismag/claude-code-monitor@1.3.1","maintainers":[{"name":"arismag","email":"aris@pointblank.gr"}],"homepage":"https://github.com/onikan27/claude-code-monitor#readme","bugs":{"url":"https://github.com/onikan27/claude-code-monitor/issues"},"os":["darwin","linux"],"bin":{"ccm":"dist/bin/ccm.js"},"dist":{"shasum":"244ad525eb4f8cbf4cfbb128f9ced155240f2ba5","tarball":"https://registry.npmjs.org/@arismag/claude-code-monitor/-/claude-code-monitor-1.3.1.tgz","fileCount":97,"integrity":"sha512-x9vNQpeNGB7jK42P30+YRLI5AlaKxbklcRdPZczokHsxMT7bf3fNUAqD+iiAksrlX00AbpYfloe+9esF/ys2KA==","signatures":[{"sig":"MEYCIQDnz4o6B1WxPOJ6xd5N5CYyEMYVtWVHlnZ/zmnfhUuECgIhAKQM5eGOcUe9y1xjObBd4/+lh7MVwqFEv2btKevm3aB3","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":263373},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"06624d3908e7be6d2466e8449552343716d0e549","scripts":{"dev":"tsx watch src/bin/ccm.tsx","lint":"biome check .","test":"vitest run","build":"tsc","start":"node dist/bin/ccm.js","format":"biome format --write .","lint:fix":"biome check --write .","typecheck":"tsc --noEmit","test:watch":"vitest","test:coverage":"vitest run --coverage","prepublishOnly":"npm run build"},"_npmUser":{"name":"arismag","email":"aris@pointblank.gr"},"repository":{"url":"git+https://github.com/onikan27/claude-code-monitor.git","type":"git"},"_npmVersion":"10.9.2","description":"CLI for monitoring multiple Claude Code sessions in real-time","directories":{},"_nodeVersion":"22.17.0","dependencies":{"ws":"^8.19.0","ink":"^5.2.0","react":"^18.3.1","chokidar":"^4.0.3","commander":"^13.1.0","qrcode-terminal":"^0.12.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.20.3","vitest":"^4.0.17","@types/ws":"^8.18.1","typescript":"^5.8.3","@types/node":"^22.15.30","@types/react":"^18.3.12","@biomejs/biome":"^2.3.11","@vitest/coverage-v8":"^4.0.17"},"_npmOperationalInternal":{"tmp":"tmp/claude-code-monitor_1.3.1_1773651322669_0.32724351238067273","host":"s3://npm-registry-packages-npm-production"}},"1.4.0":{"name":"@arismag/claude-code-monitor","version":"1.4.0","description":"CLI for monitoring multiple Claude Code sessions in real-time","type":"module","main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"bin":{"ccm":"dist/bin/ccm.js"},"scripts":{"dev":"tsx watch src/bin/ccm.tsx","build":"tsc","start":"node dist/bin/ccm.js","test":"vitest run","test:watch":"vitest","test:coverage":"vitest run --coverage","lint":"biome check .","lint:fix":"biome check --write .","format":"biome format --write .","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"keywords":["claude","claude-code","anthropic","monitor","cli","tui","terminal","session"],"author":{"name":"onikan27"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/arismag/claude-code-monitor.git"},"bugs":{"url":"https://github.com/arismag/claude-code-monitor/issues"},"homepage":"https://github.com/arismag/claude-code-monitor#readme","engines":{"node":">=18.0.0"},"os":["darwin","linux"],"dependencies":{"chokidar":"^4.0.3","commander":"^13.1.0","ink":"^5.2.0","qrcode-terminal":"^0.12.0","react":"^18.3.1","ws":"^8.19.0"},"devDependencies":{"@biomejs/biome":"^2.3.11","@types/node":"^22.15.30","@types/react":"^18.3.12","@types/ws":"^8.18.1","@vitest/coverage-v8":"^4.0.17","tsx":"^4.20.3","typescript":"^5.8.3","vitest":"^4.0.17"},"_id":"@arismag/claude-code-monitor@1.4.0","gitHead":"36ce28aaa4ebcfd0eb4714243daa2496f1af1884","_nodeVersion":"22.17.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-MZRIIra5H3Bib/YBRgzZ2wAj1LDBEl9lB5dbCeksN4Oo4rMVl09TgTKWihCyXW5BsIfbr22zlzfLl71oI87WIw==","shasum":"cd7365066d49e8617a37f22f19dbd140d5f78708","tarball":"https://registry.npmjs.org/@arismag/claude-code-monitor/-/claude-code-monitor-1.4.0.tgz","fileCount":97,"unpackedSize":263368,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCID+DaB8TgRfCdpvWku7oXoYwhHp2Jod0EZu1LoOmLoVBAiBDCsBY11t1szLEBtHjAUNLJ9yfhwBKdspWi3X37AGRYA=="}]},"_npmUser":{"name":"arismag","email":"aris@pointblank.gr"},"directories":{},"maintainers":[{"name":"arismag","email":"aris@pointblank.gr"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/claude-code-monitor_1.4.0_1773651616052_0.8412656113198675"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-16T08:55:22.617Z","modified":"2026-03-16T09:00:16.323Z","1.3.1":"2026-03-16T08:55:22.848Z","1.4.0":"2026-03-16T09:00:16.228Z"},"bugs":{"url":"https://github.com/arismag/claude-code-monitor/issues"},"author":{"name":"onikan27"},"license":"MIT","homepage":"https://github.com/arismag/claude-code-monitor#readme","keywords":["claude","claude-code","anthropic","monitor","cli","tui","terminal","session"],"repository":{"type":"git","url":"git+https://github.com/arismag/claude-code-monitor.git"},"description":"CLI for monitoring multiple Claude Code sessions in real-time","maintainers":[{"name":"arismag","email":"aris@pointblank.gr"}],"readme":"# Claude Code Monitor\n\n[![npm version](https://img.shields.io/npm/v/@arismag/claude-code-monitor.svg)](https://www.npmjs.com/package/@arismag/claude-code-monitor)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![macOS](https://img.shields.io/badge/platform-macOS-lightgrey.svg)](https://www.apple.com/macos/)\n[![Linux](https://img.shields.io/badge/platform-Linux-lightgrey.svg)](https://kernel.org/)\n\n**Monitor multiple Claude Code sessions in real-time from your terminal or smartphone.**\n\n### Terminal UI\nMonitor sessions with keyboard navigation\n\n<p align=\"center\">\n  <img src=\"https://raw.githubusercontent.com/onikan27/claude-code-monitor/main/docs/ccm-demo.gif\" alt=\"Terminal UI Demo\" width=\"800\">\n</p>\n\n### Mobile Web\nControl from your phone (same Wi-Fi or Tailscale)\n\n<p align=\"center\">\n  <img src=\"https://raw.githubusercontent.com/onikan27/claude-code-monitor/main/docs/mobile-web-demo.gif\" alt=\"Mobile Web Demo\" width=\"800\">\n</p>\n\n---\n\n## ✨ Features\n\n| Terminal (TUI) | Mobile Web |\n|----------------|------------|\n| Real-time session monitoring | Monitor from your smartphone |\n| Quick tab focus with keyboard | Remote terminal focus |\n| Vim-style navigation | Send messages to terminal |\n| Simple status display | Permission prompt navigation |\n| | Screen capture with pinch zoom |\n\n- 🔌 **Serverless** - File-based state management, no API server required\n- ⚡ **Easy Setup** - One command `ccm` for automatic setup and launch\n- 🔒 **Secure** - No external data transmission, token-based mobile auth\n\n---\n\n## 📋 Requirements\n\n- **macOS** or **Linux** (X11)\n- **Node.js** >= 18.0.0\n- **Claude Code** installed\n- **Linux only**: `xdotool` recommended for window focus and keystroke support\n\n---\n\n## 🚀 Quick Start\n\n### Run with npx (no install required)\n\n```bash\nnpx @arismag/claude-code-monitor\n```\n\n### Or install globally\n\n```bash\nnpm install -g @arismag/claude-code-monitor\nccm\n```\n\n### Install from source\n\n```bash\ngit clone https://github.com/arismag/claude-code-monitor.git\ncd claude-code-monitor\nnpm install\nnpm run build\nnpm install -g .\nccm\n```\n\nOn first run, it automatically sets up hooks and launches the monitor.\n\n### Mobile Access\n\n1. Press `h` to show QR code (default port: 3456)\n2. Scan with your smartphone (same Wi-Fi required)\n\n> If port 3456 is in use, an available port is automatically selected.\n\n### Remote Access with Tailscale\n\nAccess from anywhere using [Tailscale](https://tailscale.com/) (secure VPN).\n\n**Prerequisites:**\n1. Install Tailscale on your computer and smartphone\n2. Sign in with the same Tailscale account on both devices\n3. Ensure Tailscale is connected (check menu bar icon)\n\n```bash\n# Start with Tailscale IP\nnpx @arismag/claude-code-monitor -t\n\n# Or if installed globally\nccm -t\n```\n\nWith `-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.\n\n> **Security**: Tailscale uses WireGuard encryption. Communication is secure even over public networks.\n\n---\n\n## 📖 Usage\n\n### Commands\n\n| Command | Alias | Description |\n|---------|-------|-------------|\n| `ccm` | - | Launch monitor (auto-setup if needed) |\n| `ccm watch` | `ccm w` | Launch monitor |\n| `ccm serve` | `ccm s` | Start mobile web server only |\n| `ccm setup` | - | Configure Claude Code hooks |\n| `ccm list` | `ccm ls` | List sessions |\n| `ccm clear` | - | Clear all sessions |\n\n### Options\n\n| Option | Description |\n|--------|-------------|\n| `--qr` | Show QR code on startup |\n| `-t, --tailscale` | Prefer Tailscale IP for mobile access |\n| `-p, --port <port>` | Specify port (serve command only) |\n\n### Keybindings\n\n| Key | Action |\n|-----|--------|\n| `↑` / `k` | Move up |\n| `↓` / `j` | Move down |\n| `Enter` / `f` | Focus selected session |\n| `1-9` | Quick select & focus |\n| `h` | Show/Hide QR code |\n| `c` | Clear all sessions |\n| `q` / `Esc` | Quit |\n\n### Status Icons\n\n| Icon | Status | Description |\n|------|--------|-------------|\n| `●` | Running | Claude Code is processing |\n| `◐` | Waiting | Waiting for user input |\n| `✓` | Done | Session ended |\n\n---\n\n## 📱 Mobile Web Interface\n\nMonitor and control Claude Code sessions from your smartphone.\n\n### Features\n\n- Real-time session status via WebSocket\n- View latest Claude messages\n- Focus terminal sessions remotely\n- Send text messages to terminal (multi-line supported)\n- **Permission prompt navigation** - Respond to permission dialogs remotely\n  - Direction pad for arrow keys (up/down/left/right) and Enter\n  - Screen capture to view terminal state\n  - Pinch zoom (1x-5x) for captured screenshots\n- Swipe-to-close gesture on modal\n- Warning display for dangerous commands\n\n### Security\n\n> **Important**: Your smartphone and computer must be on the **same Wi-Fi network** (or use Tailscale with `-t` option for remote access).\n\n- **Token Authentication** - A unique token is generated for authentication\n- **Local Network Only** - Not accessible from the internet\n- **Do not share the URL** - Treat it like a password\n\n**Recommended networks:**\n- Home Wi-Fi\n- Office/Work Wi-Fi\n\n> **Warning**: Avoid using on public Wi-Fi networks (cafes, airports, etc.). Other users on the same network could potentially access your monitor.\n\n---\n\n## 🖥️ Supported Terminals\n\n### macOS\n\n| Terminal | Focus Support | Notes |\n|----------|--------------|-------|\n| iTerm2 | ✅ Full | TTY-based window/tab targeting |\n| Terminal.app | ✅ Full | TTY-based window/tab targeting |\n| Ghostty | ✅ Full | Title-based window targeting via Window menu |\n\n### Linux\n\n| Terminal | Focus Support | Notes |\n|----------|--------------|-------|\n| Any X11 terminal | ✅ With xdotool | Process tree walking to find window |\n| Any terminal | ⚠️ Partial | TTY-based text/keystroke send, no window focus |\n\n> On Linux, install `xdotool` for full focus support: `sudo apt install xdotool`\n> Screen capture on Linux is not yet supported.\n\n> Other terminals can use monitoring, but focus feature may be limited.\n\n### Ghostty Users\n\nFor reliable focus functionality with multiple tabs, `ccm` or `ccm setup` will prompt you to add the following setting:\n\n```json\n// ~/.claude/settings.json\n{\n  \"env\": {\n    \"CLAUDE_CODE_DISABLE_TERMINAL_TITLE\": \"1\"\n  }\n}\n```\n\nThis prevents Claude Code from overwriting terminal titles, which is necessary for tab identification in Ghostty.\n\nIf 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.\n\n---\n\n## 🔧 Troubleshooting\n\n### Sessions not showing\n\n1. Run `ccm setup` to verify hook configuration\n2. Check `~/.claude/settings.json` for hook settings\n3. Restart Claude Code\n\n### Focus not working\n\n**macOS:**\n1. Verify you're using a supported terminal\n2. Check System Preferences > Privacy & Security > Accessibility\n   - Ensure your terminal app has Accessibility permission\n\n**Linux:**\n1. Ensure `xdotool` is installed: `xdotool --version`\n2. Verify you're running an X11 session (Wayland is not yet supported)\n\n### Reset data\n\n```bash\nccm clear\n```\n\n---\n\n## 🔒 Security\n\n> **Warning**: Without Tailscale, this tool is designed for use on **trusted private networks only**.\n>\n> **Never use on public Wi-Fi** (cafes, airports, hotels, co-working spaces, etc.) without Tailscale.\n> Other users on the same network could potentially intercept the authentication token\n> and gain control of your terminal sessions, including the ability to execute arbitrary commands.\n\n- **No data sent to external servers** - All data stays on your machine\n- Hook registration modifies `~/.claude/settings.json`\n- Focus feature uses AppleScript (macOS) or xdotool/TTY (Linux) for terminal control\n- Mobile Web uses token authentication on local network only\n- Server-side validation blocks dangerous shell commands\n\n### Secure Remote Access\n\nFor secure access from outside your local network, use the `-t` (Tailscale) option:\n\n| Mode | Network | Security |\n|------|---------|----------|\n| Default | Same Wi-Fi only | Home/Office Wi-Fi recommended |\n| `-t` (Tailscale) | Anywhere in Tailnet | WireGuard encrypted, safe on any network |\n\nWith Tailscale, communication is encrypted end-to-end, making it safe to use even on public Wi-Fi (cafes, airports, etc.).\n\n---\n\n## 📦 Programmatic Usage\n\n```typescript\nimport { getSessions, focusSession } from '@arismag/claude-code-monitor';\n\nconst sessions = getSessions();\nif (sessions[0]?.tty) {\n  focusSession(sessions[0].tty);\n}\n```\n\n---\n\n## ⚠️ Disclaimer\n\nThis is an unofficial community tool and is not affiliated with Anthropic.\n\"Claude\" and \"Claude Code\" are trademarks of Anthropic.\n\n---\n\n## 🐛 Issues\n\nFound a bug? [Open an issue](https://github.com/arismag/claude-code-monitor/issues)\n\n---\n\n## 🤝 Contributing\n\nContributions are welcome! Please open an issue or submit a PR.\n\n---\n\n## 📝 Changelog\n\nSee [CHANGELOG.md](./CHANGELOG.md) for details.\n\n---\n\n## 📄 License\n\nMIT\n\n---\n\n<p align=\"center\">Made with ❤️ for the Claude Code community</p>\n","readmeFilename":"README.md"}