claude-code-monitor

作者 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.

265
Stars
28
Forks
TypeScript
语言
2026/8/23
添加时间

⚠️ 第三方软件声明

本 Skill 为第三方开源软件,独立托管于 GitHub。SkillTip 仅为信息目录,不控制或维护底层仓库。所显示的安全检查为自动化且范围有限,安装前请自行审查源码。

阅读服务条款

安装

添加到你的 Claude Code skills 目录:

# Add to your Claude Code skills
git clone https://github.com/onikan27/claude-code-monitor

快速入门

使用 claude-code-monitor 等 Skills 的指南。

安全报告

已验证

上次扫描:—

{
  "status": "PASSED",
  "issues": []
}

README.md

Claude Code Monitor

npm version License: MIT macOS

Monitor multiple Claude Code sessions in real-time from your terminal or smartphone.

Terminal UI

Monitor sessions with keyboard navigation

Terminal UI Demo

Mobile Web

Control from your phone (same Wi-Fi or Tailscale)

Mobile Web Demo


✨ Features

Terminal (TUI)Mobile Web
Real-time session monitoringMonitor from your smartphone
Quick tab focus with keyboardRemote terminal focus
Vim-style navigationSend messages to terminal
Simple status displayPermission prompt navigation
Screen capture with pinch zoom
  • 🔌 Serverless - File-based state management, no API server required
  • Easy Setup - One command ccm for automatic setup and launch
  • 🔒 Secure - No external data transmission, token-based mobile auth

📋 Requirements

Note: This tool is macOS only due to its use of AppleScript for terminal control.

  • macOS
  • Node.js >= 18.0.0
  • Claude Code installed

🚀 Quick Start

Run with npx (no install required)

npx claude-code-monitor

Or install globally

npm install -g claude-code-monitor
ccm

On first run, it automatically sets up hooks and launches the monitor.

Mobile Access

  1. Press h to show QR code (default port: 3456)
  2. Scan with your smartphone (same Wi-Fi required)

If port 3456 is in use, an available port is automatically selected.

Remote Access with Tailscale

Access from anywhere using Tailscale (secure VPN).

Prerequisites:

  1. Install Tailscale on your Mac and smartphone
  2. Sign in with the same Tailscale account on both devices
  3. Ensure Tailscale is connected (check menu bar icon)
# 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.


📖 Usage

Commands

CommandAliasDescription
ccm-Launch monitor (auto-setup if needed)
ccm watchccm wLaunch monitor
ccm serveccm sStart mobile web server only
ccm setup-Configure Claude Code hooks
ccm listccm lsList sessions
ccm clear-Clear all sessions

Options

OptionDescription
--qrShow QR code on startup
-t, --tailscalePrefer Tailscale IP for mobile access
-p, --port <port>Specify port (serve command only)

Keybindings

KeyAction
/ kMove up
/ jMove down
Enter / fFocus selected session
1-9Quick select & focus
hShow/Hide QR code
cClear all sessions
q / EscQuit

Status Icons

IconStatusDescription
RunningClaude Code is processing
WaitingWaiting for user input
DoneSession ended

📱 Mobile Web Interface

Monitor and control Claude Code sessions from your smartphone.

Features

  • Real-time session status via WebSocket
  • View latest Claude messages
  • Focus terminal sessions remotely
  • Send text messages to terminal (multi-line supported)
  • Permission prompt navigation - Respond to permission dialogs remotely
    • Direction pad for arrow keys (up/down/left/right) and Enter
    • Screen capture to view terminal state
    • Pinch zoom (1x-5x) for captured screenshots
  • Swipe-to-close gesture on modal
  • Warning display for dangerous commands

Security

Important: Your smartphone and Mac must be on the same Wi-Fi network (or use Tailscale with -t option for remote access).

  • Token Authentication - A unique token is generated for authentication
  • Local Network Only - Not accessible from the internet
  • Do not share the URL - Treat it like a password

Recommended networks:

  • Home Wi-Fi
  • Office/Work Wi-Fi

Warning: Avoid using on public Wi-Fi networks (cafes, airports, etc.). Other users on the same network could potentially access your monitor.


🖥️ Supported Terminals

TerminalFocus SupportNotes
iTerm2✅ FullTTY-based window/tab targeting
Terminal.app✅ FullTTY-based window/tab targeting
Ghostty✅ FullTitle-based window targeting via Window menu

Other terminals can use monitoring, but focus feature is not supported.

Ghostty Users

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.


🔧 Troubleshooting

Sessions not showing

  1. Run ccm setup to verify hook configuration
  2. Check ~/.claude/settings.json for hook settings
  3. Restart Claude Code

Focus not working

  1. Verify you're using a supported terminal
  2. Check System Preferences > Privacy & Security > Accessibility
    • Ensure your terminal app has Accessibility permission

Reset data

ccm clear

🔒 Security

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.

  • No data sent to external servers - All data stays on your machine
  • Hook registration modifies ~/.claude/settings.json
  • Focus feature uses AppleScript for terminal control
  • Mobile Web uses token authentication on local network only
  • Server-side validation blocks dangerous shell commands

Secure Remote Access

For secure access from outside your local network, use the -t (Tailscale) option:

ModeNetworkSecurity
DefaultSame Wi-Fi onlyHome/Office Wi-Fi recommended
-t (Tailscale)Anywhere in TailnetWireGuard 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.).


📦 Programmatic Usage

import { getSessions, focusSession } from 'claude-code-monitor';

const sessions = getSessions();
if (sessions[0]?.tty) {
  focusSession(sessions[0].tty);
}

⚠️ Disclaimer

This is an unofficial community tool and is not affiliated with Anthropic. "Claude" and "Claude Code" are trademarks of Anthropic.


🐛 Issues

Found a bug? Open an issue


🤝 Contributing

Contributions are welcome! Please open an issue or submit a PR.


📝 Changelog

See CHANGELOG.md for details.


📄 License

MIT


Made with ❤️ for the Claude Code community

常见问题

What is claude-code-monitor?

claude-code-monitor is an open-source cli tools skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built 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. It has 265 GitHub stars.

Is claude-code-monitor safe to use?

Yes. claude-code-monitor passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.

How do I install claude-code-monitor?

Clone the repository with "git clone https://github.com/onikan27/claude-code-monitor" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is claude-code-monitor written in?

claude-code-monitor is primarily written in TypeScript. It is open-source under onikan27 on GitHub, so you can review or fork the full source.

Are there alternatives to claude-code-monitor?

Yes. SkillsLLM lists many other CLI Tools skills you can browse and compare side by side. Open the CLI Tools category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh claude-code-monitor against similar tools.

评论 (0)

暂无评论,成为第一个分享想法的人!

ui-ux-pro-max-skill

by nextlevelbuilder

12

An AI skill that provides design intelligence for building professional UI/UX across multiple platforms.

119,92012,870Python
CLI 工具ai-skillsantigravity
查看详情

happy

by slopus

Mobile and Web client for Codex and Claude Code, with realtime voice, encryption and fully featured

23,4501,980TypeScript
CLI 工具
查看详情

claudecodeui

by siteboon

Use Claude Code, OpenCode, Cursor CLI, and Codex on mobile and web with CloudCLI (aka Claude Code UI). CloudCLI is a free open source webui/GUI that helps you manage your Claude Code session and projects remotely.

13,3941,866TypeScript
CLI 工具
查看详情

CRS-自建Claude Code镜像,一站式开源中转服务,让 Claude、OpenAI、Gemini、Droid 订阅统一接入,支持拼车共享,更高效分摊成本,原生工具无缝使用。

12,5471,869JavaScript
CLI 工具
查看详情

ccstatusline

by sirmalloc

🚀 Beautiful highly customizable statusline for Claude Code CLI with powerline support, themes, and more.

12,508545TypeScript
CLI 工具
查看详情

开发者还喜欢

基于喜欢此 Skill 的开发者投票和收藏

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP 服务器apisai-tools
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情