← Back to Skills Marketplace
1zn

Cc Log Viewer

by zn · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ⚠ suspicious
18
Downloads
0
Stars
0
Active Installs
2
Versions
Install in OpenClaw
/install cc-log-viewer
Description
实时 Log Viewer,捕获 Claude Code 终端输出,通过 WebSocket 推送到浏览器页面实时显示。用于远程/移动设备上观察 CC 执行任务的过程,或者将 CC 终端嵌入监控面板。同时也提供 CC 进程管理和命令行发送功能。
README (SKILL.md)

Cc Log Viewer

实时捕获 Claude Code 终端输出,通过 WebSocket 推送到浏览器。支持远程/移动设备观察 CC 执行任务,也可嵌入监控面板。

快速开始

前置条件

条件 说明
Node.js ≥ v18 运行后端服务
npm 包管理
Claude Code CLI claude 命令可用
C++ 编译工具 node-pty 编译需要(Linux: build-essential, macOS: Xcode CLT)

网络要求

服务端和浏览器之间需要网络可达:

场景 方案
同一台机器 http://localhost:18798/,无需额外配置
局域网(同 WiFi) 用服务端局域网 IP,如 http://192.168.1.x:18798/
远程/移动设备 推荐装 Tailscale,手机连上后通过 Tailscale IP 访问,无需公网 IP 或端口转发

⚠️ 手机和服务端不在同一网络且没有 Tailscale 时,浏览器会显示空白或反复重连。

安装

cd ~/.openclaw/workspace/skills/cc-log-viewer
cd assets && npm install && cd ..
bash assets/start-all.sh

验证

curl http://localhost:18798/api/status
# → {"running":true,"clients":0,"bufferLines":87}

访问浏览器

http://localhost:18798/
嵌入模式:http://localhost:18798/?embed=1

HTTP API

方法 路径 说明
GET /api/status 状态查询
POST /api/send 向 CC 发命令(body: {"command":"..."}
POST /api/restart 重启 CC 进程

技术架构

log-streamer.js (单进程,端口可配置 — 默认 18798)
  ├─ node-pty — 为 CC 提供真实 pty 环境
  │    ↓ stdout
  ├─ 环形缓冲 (1000行)
  │    ↓ 100ms 轮询
  ├─ WebSocket Server — 实时推送
  │    ↓
  ├─ xterm.js (自托管 /cdn/) — 浏览器终端渲染
  └─ HTTP API

停止

kill $(lsof -t -i:18798) 2>/dev/null
# 仅重启 CC 不停服务:
curl -X POST http://localhost:18798/api/restart

文件

路径 说明
scripts/log-streamer.js 后端服务(HTTP + WebSocket + CC 进程管理)
assets/index.html 前端 xterm.js 页面
assets/start-all.sh 一键启动脚本
assets/package.json npm 依赖
Usage Guidance
Install only in a tightly controlled local environment, and do not expose this service to a LAN, Tailscale network, or the internet unless you add authentication, localhost-only defaults, and remove --dangerously-skip-permissions. Treat anything shown in the terminal viewer as potentially sensitive, and review the startup script because it may terminate unrelated services on the selected port.
Capability Assessment
Purpose & Capability
The log-viewing purpose is coherent and the docs disclose command sending and process management, but the implementation also creates a high-impact remote control surface for a live Claude session.
Instruction Scope
The service listens on 0.0.0.0, allows all CORS origins, accepts HTTP and WebSocket commands, and documents LAN/Tailscale access without clear authentication, authorization, or exposure warnings.
Install Mechanism
The startup script installs normal npm dependencies but also kills any process on the configured port and starts a background server with nohup, without ownership checks or confirmation.
Credentials
Mirroring terminal output to network clients can expose prompts, paths, secrets, and operational data; this is not proportionate without localhost-only defaults or access controls.
Persistence & Privilege
The server is long-running, can restart the Claude subprocess remotely, and launches Claude with --dangerously-skip-permissions while inheriting the process environment.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install cc-log-viewer
  3. After installation, invoke the skill by name or use /cc-log-viewer
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.1
移除无关的 /api/graph 接口(知识图谱数据不在此 skill 范围内)
v1.0.0
- Initial release of cc-log-viewer. - Real-time log viewer for Claude Code, streaming terminal output to browsers via WebSocket. - Supports remote/mobile monitoring and embedding in dashboards. - Includes CC process management and remote command sending through HTTP API. - Provides quick setup guides, mobile access via Tailscale, and embedded terminal UI with xterm.js. - Offers essential HTTP endpoints for status, command execution, process restart, and knowledge graph data.
Metadata
Slug cc-log-viewer
Version 1.0.1
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 2
Frequently Asked Questions

What is Cc Log Viewer?

实时 Log Viewer,捕获 Claude Code 终端输出,通过 WebSocket 推送到浏览器页面实时显示。用于远程/移动设备上观察 CC 执行任务的过程,或者将 CC 终端嵌入监控面板。同时也提供 CC 进程管理和命令行发送功能。 It is an AI Agent Skill for Claude Code / OpenClaw, with 18 downloads so far.

How do I install Cc Log Viewer?

Run "/install cc-log-viewer" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Cc Log Viewer free?

Yes, Cc Log Viewer is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Cc Log Viewer support?

Cc Log Viewer is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Cc Log Viewer?

It is built and maintained by zn (@1zn); the current version is v1.0.1.

💬 Comments