npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@fevze/cloudcode

v0.1.3

Published

CloudCode CLI Agent — 在电脑上运行,接收来自手机浏览器的指令,驱动本地 Claude Code 执行。

Readme

@fevze/cloudcode

CloudCode CLI Agent — 在电脑上运行,接收来自手机浏览器的指令,驱动本地 Claude Code 执行。

安装

Linux / macOS

curl -fsSL https://cloudcode.iava.top/install.sh | bash

Windows (PowerShell)

iwr -useb https://cloudcode.iava.top/install.ps1 | iex

手动安装

git clone <repo-url> && cd cloudcode/packages/cli
pnpm install
npm install -g .

需要 Node.js >= 18。

使用

cloudcode login          # 注册设备,获取绑定 Token
cloudcode daemon start   # 启动 Agent 守护进程
cloudcode daemon stop    # 停止守护进程
cloudcode status         # 查看连接状态
cloudcode logout         # 退出登录,清除配置

工作流程

手机浏览器 (H5)  ⇄  服务器 (Next.js + Socket.IO)  ⇄  CLI Agent  ⇄  本地 Claude Code
  1. cloudcode login 向服务器注册设备,获取 device_token
  2. 在手机端 CloudCode 应用中输入该 Token 完成设备绑定
  3. cloudcode daemon start 启动 Agent,通过 WebSocket 连接服务器
  4. 手机端发送指令 → 服务器转发 → Agent 在本机执行 Claude Code → 结果实时回传

配置

配置数据存储在系统用户目录下(通过 [conf] 持久化)。

| 字段 | 默认值 | 说明 | |------|--------|------| | serverUrl | https://cloudcode.iava.top | 服务器地址 | | deviceToken | — | 设备认证令牌(login 后自动设置) | | deviceId | — | 服务器分配的设备 ID | | deviceName | 当前主机名 | 设备显示名称 |

项目结构

packages/cli/
├── bin/cloudcode.js      # npm bin 入口
├── src/
│   ├── index.ts          # CLI 入口,Commander 命令注册
│   ├── config.ts         # 持久化配置管理
│   ├── agent.ts          # Agent 核心:Socket.IO 连接 + Claude Code 进程管理
│   └── commands/
│       ├── login.ts      # cloudcode login
│       ├── logout.ts     # cloudcode logout
│       ├── daemon.ts     # cloudcode daemon start/stop/status
│       └── status.ts     # cloudcode status
└── package.json

关键特性

  • 流式输出 — 解析 Claude Code 的 stream-json 输出,实时回传文本、思考过程、工具调用步骤
  • 会话恢复 — 通过 --resume 保持多轮对话的上下文连续性
  • 历史会话 — 支持列出和恢复本机 ~/.claude/projects/ 下的历史 Claude Code 会话
  • 去重机制 — 防止流式解析中的重复文本和状态事件
  • 心跳保活 — 30 秒心跳维持 WebSocket 连接