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

keyleak

v0.2.0

Published

Smallest, fastest secrets detecting tool — zero false positives.

Readme

keyleak

最小、最快、规则最全的密钥检测工具,零误报。

  • 核心:极简体积,零运行时依赖,两文件设计(一代码一规则)。TypeScript。
  • 速度:规则预编译,默认排除 node_modules 等编译目录,可选按大小/文件名/后缀过滤。
  • 覆盖:1000+ 条特征,100+ 种密钥类型(AWS、GitHub、OpenAI、Stripe、DB URL、PII 等)。
  • 精准:关键词预过滤、熵阈值、行内 keyleak:ignore;可用 --disable 按 id 关闭规则。

运行npx keyleak · 输入:stdin、文件或目录 · 输出:text(默认)、JSON、CSV

快速开始

npx keyleak ./src

选项

| 选项 | 说明 | |------|------| | --stdin | 从标准输入读取内容 | | --format <json\|text\|csv> | 输出格式(默认 text) | | --rule <path> | 自定义规则 JSON 文件(默认 ./rules.json) | | --disable <id1,id2,...> | 按 id 关闭规则(减少误报) | | --max-size <n>[k\|m] | 跳过大于 n 字节的文件 | | --exclude-dir <name1,...> | 排除目录名(默认 node_modules、.git、vendor、dist 等) | | --ext <.a,.b> / --exclude-ext | 按文件后缀过滤 | | --debug | 将每个扫描到的文件路径打印到 stderr | | --absolute | 输出绝对路径(默认相对 cwd) | | --fail | 发现密钥时退出码 1(用于 CI) |

位置参数:要扫描的文件或目录路径。未提供且未使用 --stdin 时不扫描。

集成示例

  • Git diffgit diff | npx keyleak --stdin
  • 提交前npx keyleak . --fail
  • CI(如 GitHub Actions)npx keyleak . --fail --format json
  • Docker:挂载仓库后执行 npx keyleak /path
  • 发送给 AI 前:内容经 npx keyleak --stdin 再发给 Copilot/Claude/Gemini

行内忽略

在行内加上 keyleak:ignore 可跳过该行的密钥上报(如测试用例)。

License

MIT