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

@wengine-ai/stats-local

v1.0.0

Published

Local Claude Code AI coding stats CLI for arbitrary Git repositories

Downloads

18

Readme

@wengine-ai/stats-local

Claude Code 本地 AI 编码统计 CLI,可通过 npm / npx 给任意 Git 仓库安装本地统计能力。

功能特性

  • 记录 Claude Code Edit / Write / NotebookEdit 事件
  • git commit 后自动 reconcile 分支净值与累计值
  • 使用本地 SQLite 保存统计数据
  • 支持 status / branch-summary / file-summary / sessions / audit
  • 提供 trusted / degraded / tampered 信任状态
  • 支持通过 init 为任意仓库安装 hook

安装与使用

使用 npx(推荐)

在目标仓库中执行:

npx @wengine-ai/stats-local init --repo .

初始化完成后可直接查询:

npx @wengine-ai/stats-local status --repo .
npx @wengine-ai/stats-local branch-summary --repo .
npx @wengine-ai/stats-local audit --repo .

全局安装

npm install -g @wengine-ai/stats-local

然后在任意仓库中执行:

stats-local init --repo .
stats-local status --repo .
stats-local sessions --repo .

核心命令

stats-local init [--repo <path>]
stats-local doctor [--repo <path>]
stats-local status [--repo <path>]
stats-local branch-summary [--repo <path>]
stats-local file-summary --file <path> [--repo <path>]
stats-local sessions [--repo <path>]
stats-local audit [--repo <path>]
stats-local reconcile [--repo <path>] [--base-branch <branch>]

初始化会做什么

init 会自动:

  • 检测目标路径对应的 Git 仓库根目录
  • 安装 Claude Code PostToolUse hook 到 <repo>/.claude/settings.local.json
  • 安装 Git post-commit hook 到 Git hooks 目录
  • 在目标仓库 .claude/wengine-ai-stats-local/ 下写入运行时脚本/产物

平台说明

  • macOS / Linux:原生支持
  • Windows:建议通过 Git Bash / Git for Windows 使用 Git hook
  • 数据库默认保存在用户数据目录,不写入业务源码目录

本地开发

cd wengine-ai-stats-local
npm install
npm run test
npm run build

源码开发模式下,也可用兼容脚本给当前仓库安装:

./scripts/install-claude-stats.sh .

发布前验证

npm test
npm run build
npm pack