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

desktop-pet

v1.0.3

Published

A simple desktop pet application

Readme

🐶 Desktop Pet for Trae (Trae 桌宠伴侣)

一个运行在桌面上、能感知你 Trae 编程状态的可爱桌宠。当你写代码时,它会陪你一起工作;当你停下来时,它也会休息。


📦 1. 安装 (Install)

确保你的电脑已安装 Node.js (通常安装了 Trae 就自带环境)。

在终端运行以下命令进行全局安装:

npm install -g desktop-pet

⚙️ 2. 初始化配置 (Setup)

为了让桌宠能感知 Trae 的状态,需要进行一次性注入配置。

🍎 macOS 系统

  1. 运行注入命令(需要管理员权限):

    sudo pet install-patch

    如果你使用 nvm 管理 Node 版本,sudo 可能会报错找不到命令,请尝试:

    sudo $(which node) $(which pet) install-patch
  2. 重启 Trae: 配置完成后,请彻底关闭并重启你的 Trae 编辑器。

🪟 Windows 系统

  1. 以管理员身份打开 PowerShell 或 CMD

    • 右键点击开始菜单,选择 "Windows PowerShell (管理员)""终端(管理员)"
  2. 运行注入命令

    pet install-patch
  3. 重启 Trae: 配置完成后,请彻底关闭并重启你的 Trae 编辑器。

💡 提示:Windows 安装时脚本会自动搜索 Trae 的常见安装位置(包括 C盘、D盘、Program Files、LOCALAPPDATA 等)。如果 Trae 安装在非标准位置,可能需要手动指定路径。


🚀 3. 启动桌宠 (Start)

随时随地,在终端输入以下命令召唤桌宠:

pet start

🍎 macOS

  • 桌宠窗口会出现在屏幕上(默认置顶)
  • 点击菜单栏托盘图标可以隐藏/显示桌宠

🪟 Windows

  • 桌宠窗口会出现在屏幕上(默认置顶)
  • 点击系统托盘图标可以隐藏/显示桌宠

状态说明

桌宠会监控你打开的所有Trae窗口,包括Trae和Trae CN,并且会根据项目名称进行区分。

  • Idle (发呆):当Trae侧栏的AI没有写代码时或工作的状态
  • Coding (工作):当你在Trae的侧栏中与AI交互,AI正在工作的状态(包括写代码,思考,执行脚本等)
  • Done (完成):当Trae侧栏的AI完成需求时,会显示Done状态,并提醒你哪个项目的AI完成了工作

🛠 常用命令清单

| 命令 | 说明 | 备注 | | ----------------------- | ---------------------- | ------------------ | | pet start | 启动桌宠 | 不需要管理员权限 | | pet install-patch | 注入监控代码到 Trae | 需要重启 Trae 生效 | | pet uninstall-patch | 移除监控代码,恢复原状 | 卸载前推荐执行 |

🍎 macOS 命令示例

# 注入监控(需要 sudo)
sudo pet install-patch

# 移除监控(需要 sudo)
sudo pet uninstall-patch

# 启动桌宠
pet start

🪟 Windows 命令示例

# 以管理员身份运行 PowerShell,然后执行:

# 注入监控
pet install-patch

# 移除监控
pet uninstall-patch

# 启动桌宠(普通权限即可)
pet start

🗑 卸载 (Uninstall)

如果你不想用了,请按以下顺序操作以保持系统整洁:

🍎 macOS

# 1. 恢复 Trae 文件
sudo pet uninstall-patch

# 2. 卸载插件
npm uninstall -g desktop-pet

🪟 Windows

# 1. 以管理员身份打开 PowerShell,恢复 Trae 文件
pet uninstall-patch

# 2. 卸载插件(普通权限即可)
npm uninstall -g desktop-pet

🔧 故障排查

桌宠没有反应?

  1. 检查 Trae 是否已注入监控代码

    • 重新运行 sudo pet install-patch (macOS) 或 pet install-patch (Windows 管理员)
  2. 检查桌宠服务是否启动

    • 重新运行 pet start
  3. 查看 Trae 开发者工具

    • [ ] macOS: Cmd + Option + I
    • [ ] Windows: Ctrl + Shift + I
    • [ ] 在 Console 中搜索 "桌宠" 或 "PetError" 查看错误信息

注入失败?

  • macOS: 确保使用了 sudo
  • Windows: 确保以管理员身份运行 PowerShell/CMD

其他问题?

欢迎提交 Issue 或查看项目文档获取帮助。