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

c0de-agent

v1.8.0

Published

Open-source AI coding assistant with Browser-Server architecture

Readme

c0de-agent

开源 AI 编码助手,采用 Browser-Server 架构(Hono + SSE 后端 / React 前端 / PGLite 本地数据库 / CLI)。

特性

  • Browser-Server 架构:Hono 后端通过 SSE 推送 LLM 流式响应;React 前端单页应用。
  • 本地优先:会话与索引存储在 PGLite(浏览器/进程内 PostgreSQL),数据随用随取。
  • 多项目:工作区隔离的多项目管理,每个项目独立会话历史与配置。
  • 工具系统:内置文件读写、bash、grep、glob、编辑等工具,可按需启用/禁用。
  • 权限模式default / yolo 等授权模式,控制工具执行前是否需用户确认。
  • 会话可恢复:会话快照序列化/反序列化,支持进程重启后无缝恢复。
  • 无感知热更新:后台定期检查新版本,序列化当前会话 → npm 自更新 → 端口 handoff 接管,用户无感升级。
  • Web 搜索:内置 websearch 工具,支持多搜索引擎。
  • 斜杠命令/compact/model/clear 等可配置的斜杠命令。
  • 主题与多语言:亮/暗主题,简体中文 / English。

安装

# 全局安装(推荐)
npm install -g c0de-agent

# 或用 pnpm / yarn
pnpm add -g c0de-agent

要求 Node.js >= 22.0.0。

使用

# 在项目目录启动
c0de serve

# 指定端口并自动打开浏览器
c0de serve --port 3000 --open

# 从快照恢复会话
c0de serve --restore snapshot.json

# 打印模式(单次问答,不启动服务)
c0de chat "解释这段代码"

# 更新检查
c0de update --check

启动后访问 http://localhost:3000

开发

# 安装依赖
pnpm install

# 启动开发服务器(前端热更新)
pnpm dev

# 类型检查
pnpm typecheck       # 后端
pnpm typecheck:web   # 前端

# 测试
pnpm test

# 构建
pnpm build         # 编译 CLI/后端到 dist/
pnpm build:web     # 构建前端到 dist-web/

# 代码检查与格式化
pnpm lint
pnpm format

架构

src/
├── cli/           # CLI 入口与命令(serve / chat / update)
├── core/          # 配置、agent 注册、权限、工具注册
├── llm/           # LLM provider 抽象与调用
├── server/        # Hono HTTP 服务、SSE 流、路由、handoff
├── session/       # 会话上下文与消息转换
├── shared/        # 前后端共享类型
├── tools/         # 内置工具实现
├── update/        # 版本检查、热更新调度器、会话快照
└── web/           # React 前端(组件、视图、服务、hooks)

发布

采用 semantic-release 自动化发布,基于 conventional commits(feat:fix:refactor: 等)自动计算版本号、生成 changelog 并发布到 npm。

  • main 分支推送触发 .github/workflows/release.yml
  • 通过 GitHub Actions OIDC trusted publishing 发布(无需 NPM_TOKEN)
  • 发布产物带 npm provenance(可验证来源)

License

MIT