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

llmpt

v1.3.15

Published

LLM Proxy Trace - local LLM proxy that captures full traces with real-time Web dashboard

Downloads

4,320

Readme

LPT — LLM Proxy Trace

本地 LLM 代理工具,零侵入地拦截并可视化所有 OpenAI / Anthropic API 调用

你的应用  ──►  http://localhost:19900/v1  ──►  真实 LLM Provider
                        │
                        ▼
             Web Dashboard(实时 Trace 监控)

功能特性

  • 零侵入代理 — 只需把 base_url 改为 http://localhost:19900/v1,无需修改任何应用代码
  • 实时流式追踪 — WebSocket 推送,实时响应
  • 完整 Trace 记录 — 请求体、响应体、思考链(thinking)、Tool Call、Token 用量全记录,web 前端实时查看
  • Markdown 渲染 — 响应内容支持原文 / Markdown 双视图,代码块语法高亮
  • Token 用量统计 — 输入/输出/推理/缓存命中 Token 分项展示,实时速度统计

快速开始

方式一:npx 一键启动(推荐)

无需安装,直接运行:

npx llmpt

方式二:全局安装

npm install -g llmpt
llmpt

启动后浏览器自动打开 web 前端 http://localhost:19900


配置

首次运行会在系统配置目录自动生成 .env,并打印出文件路径。编辑该文件填入 BASE_URLAPI Key 后,重启服务即可生效。

如果当前目录存在 .env,会优先使用当前目录的配置,修改后重启服务生效。


接入客户端

将 LLM SDK 的 base_url 指向本地代理,其余配置保持不变:

Python(OpenAI SDK)

from openai import OpenAI
client = OpenAI(
    base_url="http://localhost:19900/v1",
    api_key="any",   # 代理会替换为 .env 中的真实 key
)

环境变量(适用于大多数客户端)

OPENAI_BASE_URL=http://localhost:19900/v1
OPENAI_API_KEY=any

# Anthropic
ANTHROPIC_BASE_URL=http://localhost:19900

与 Claude Code 集成

llmpt claude 是为 Claude Code 专门设计的一键命令——自动启动 LPT 代理服务,再拉起 Claude Code 并将其流量路由过来,全程无需手动改任何配置:

# 一键启动,等同于 claude,所有请求都会被 LPT 拦截记录
npx llmpt claude

# 全局安装并启动
npm install -g llmpt
llmpt claude

退出 Claude Code 后,LPT 服务也会自动关闭。


技术栈

| 层 | 技术 | |----|------| | 运行时 | Node.js 18+ | | 语言 | TypeScript 5.x | | 后端框架 | Hono | | 前端框架 | React 18 + Vite 6 | | 样式 | CSS Variables + Tailwind CSS | | 字体 | 系统默认字体栈 | | 实时通信 | WebSocket (ws) | | Markdown | react-markdown + remark-gfm + highlight.js | | 配置 | dotenv (.env) | | 加密 | Node.js crypto(AES-256-GCM) |


致谢

界面设计和 Trace 展示风格参考了 claude-tap 项目。


License

MIT