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

@chasen-liao/pi-agent-desktop

v0.7.18

Published

Pi Agent Desktop — desktop client for the pi coding agent

Readme

Pi Agent Desktop

目标:做出个人极简版 Codex

Pi 编程智能体 的原生桌面客户端。基于 Electron 构建,提供比浏览器更原生的使用体验。

Release License


Pi Agent Desktop Demo


上游项目:本项目衍生自 pi-web,侧重于桌面端体验的优化与功能增强。

特性

  • 原生桌面体验 — 基于 Electron 的独立窗口应用,支持系统托盘、最小化到托盘
  • 会话浏览器 — 按工作目录分组展示所有 pi 会话
  • 实时对话 — 通过 SSE 流式输出与智能体实时交互
  • Agent 模式 — 支持 Plan / Ask / Full 三种安全模式与 Ask 工具拦截确认
  • Extension UI Bridge — 原生弹窗支持 Extension confirm/select/input/editor/notify 交互
  • 项目信任机制 — Project Trust 409 握手与授权弹窗
  • MCP 服务器管理 — 支持全局 (~/.pi/agent/mcp.json) 与项目 (<cwd>/.pi/mcp.json) MCP 配置与 UI 管理
  • 扩展与 Skill 管理 — 统一 UI 管理全局和项目扩展、Skill 启用与诊断
  • 会话分叉与克隆 — API/UI 支持从任意节点 Branch 及 Clone 会话到新目录
  • 会话导出 — 一键导出为 HTML / Markdown 格式
  • AgentMode 持久化 — 自动写入 .jsonl 自定义 desktop_agent_mode 节点,重载恢复历史模式
  • 会话内分支 — 回退到任意节点继续对话,在同一文件内创建分支
  • 分支导航器 — 可视化切换同一会话内的各个分支
  • 模型切换 — 对话中途随时切换模型
  • 工具面板 — 控制智能体可使用的工具
  • 文件浏览 — 侧边栏内置文件浏览器和查看器
  • 快捷键 — Ctrl+B 切换左侧边栏,Ctrl+Alt+B 切换右侧面板
  • 自动更新 — 支持 GitHub Releases 自动检查更新

下载安装

前往 Releases 页面下载最新版安装程序。

Windows 用户下载 Pi-Agent-Desktop-Setup-x.x.x.exe,运行即可安装。

开发

# 安装依赖
npm install

# 开发模式(浏览器)
npm run dev          # http://localhost:30141

# 开发模式(Electron 桌面窗口)
npm run dev:electron

# 类型检查
npx tsc --noEmit

# 代码检查
npm run lint

# 构建安装包
npm run dist

项目结构

app/
  api/
    sessions/      # 读取会话文件
    agent/         # 发送命令、SSE 事件流
    files/         # 文件内容读取
    models/        # 可用模型列表与默认模型
    models-config/ # 读写 models.json
    skills/        # 技能搜索与安装
    auth/          # 登录与 API Key 管理
    health/        # 健康检查
components/        # UI 组件
electron/          # Electron 主进程
hooks/             # React Hooks(会话管理、面板布局等)
lib/
  session-reader.ts  # 解析 .jsonl 会话文件
  rpc-manager.ts     # 管理 AgentSession 生命周期
  normalize.ts       # 规范化 toolCall 字段名
  types.ts

技术栈

  • 前端:Next.js + React + TypeScript
  • 桌面:Electron
  • 打包:electron-builder (NSIS)
  • 通信:SSE (Server-Sent Events) 实时流式传输

界面截图

Pi Agent Desktop Interface

致谢

  • pi-mono — Pi 编程智能体核心
  • pi-web — 上游 Web 界面项目

许可

MIT License

Star History

Star History Chart