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

zailog

v1.0.7

Published

AI Log Aggregator - MCP-based log collection and daily report generation

Downloads

55

Readme

zAILog

AI Log Aggregator - 基于 MCP 的日志收集与 LLM 日报生成系统。

安装

npm install -g zailog

或使用 npx 直接运行:

npx zailog --explore

配置

复制配置模板并修改:

cp config.example.json config.json

编辑 config.json,设置 LLM 相关配置:

{
  "llm": {
    "provider": "openai-compatible",
    "apiKey": "your-api-key",
    "model": "z-ai/glm-5.1",
    "apiBase": "https://integrate.api.nvidia.com/v1"
  }
}

快速开始

# 1. 收集所有项目日志
zailog --collect-all

# 2. 启动日志浏览器
zailog --explore
# 打开 http://localhost:3001/explore

# 3. 生成日报
zailog --generate

CLI 命令

| 命令 | 说明 | |------|------| | zailog --collect-all | 收集所有项目日志 (LOCAL > CC > OC) | | zailog --explore | 启动交互式日志浏览器 | | zailog --generate | 生成今日日报 HTML | | zailog --project [name] | 生成项目报告 | | zailog --server | 启动 MCP 服务器 | | zailog --collect | 收集本地日志(传统模式) |

选项

| 选项 | 说明 | |------|------| | --config <path> | 配置文件路径(默认 ./config.json) | | --db-path <path> | 数据库路径(默认 ./data/logs.db) | | --date <date> | 目标日期(YYYY-MM-DD) | | --incremental | 增量收集模式 |

日志浏览器

访问 http://localhost:3001/explore

  • 自然语言查询: 输入如 "昨天下午关于需求的日志,不要mcp"
  • 日历视图: 显示所有项目每月日志活动
  • 项目过滤: 左侧项目列表,点击过滤日历显示
  • 类型筛选: 按 user/assistant/last-prompt 类型过滤
  • 日期跳转: 点击日历日期直接查看当天日志

项目结构

zAILog/
├── zailog.js              # CLI 入口
├── src/
│   ├── explore.html       # 日志浏览器 UI
│   ├── query-api.js      # HTTP API 服务
│   ├── log-storage.js     # SQLite 存储
│   ├── log-collector.js   # 本地日志收集
│   ├── report-generator.js # 日报生成
│   └── mcp/              # MCP 协议实现
├── prompts/              # LLM 提示词模板
├── config.example.json    # 配置示例
└── package.json

敏感信息脱敏

规则定义在 sanitize-rules.json,自动过滤:

  • API keys、密码、Bearer tokens
  • 自定义正则 patterns

License

MIT