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

genifyai

v0.1.5

Published

Intelligent coding assistant MCP tool with AST-based code indexing

Readme

GenifyAI

让 AI 真正"看懂"你的代码结构

传统的代码搜索只是文本匹配——GenifyAI 不同。它用 AST 解析理解代码结构,精准定位函数、类、接口的定义位置,让 AI 助手能像资深开发者一样快速找到代码。

为什么需要它?

当你问 AI "handleSubmit 函数在哪",普通搜索可能返回几十个包含这个词的地方。GenifyAI 直接告诉你:定义在 src/components/Form.tsx 第 42 行

  • 🎯 精准定位 - AST 级别解析,区分定义和引用
  • 极速响应 - ripgrep 粗筛 + Tree-sitter 精筛,毫秒级返回
  • 🗣️ 自然语言 - 支持模糊搜索和别名,用你习惯的方式找代码
  • 🌐 多语言 - TypeScript/JavaScript、Vue、Python、Solidity、HTML、CSS 等(持续扩展中)

快速开始

1. 配置 MCP 客户端

{
  "mcpServers": {
    "genifyai": {
      "command": "npx",
      "args": ["-y", "genifyai"]
    }
  }
}

💡 大多数客户端会自动将工作目录设为当前打开的项目。如需指定,可添加 "cwd": "/your/project/path"

2. 重启客户端,开始使用

现在可以直接对 AI 说:

"找到 UserContext 的定义"
"handleLogin 函数在哪个文件?"
"搜索所有的 interface 定义"

3. 让 AI 主动使用(推荐)

在项目根目录的 CLAUDE.md 中添加:

## 代码搜索策略

搜索代码定义时,优先使用 genifyai MCP 工具:

- **search_symbol** - 查找函数、类、接口、类型等定义位置,比 Grep 更精准
- **search_fuzzy** - 自然语言/关键词搜索,支持模糊匹配
- **read_range** - 按行号范围读取代码,配合 search_symbol 使用
- **register_alias** - 为代码位置注册别名,提高后续搜索命中率

使用顺序:search_symbol → read_range → 其他工具

避免直接使用 Glob/Grep 搜索符号定义,genifyai 基于 AST 解析,能区分定义和引用。

当用户用自然语言描述代码且与实际命名差异较大时,主动用 register_alias 注册别名。

这会让 AI 在需要定位代码时自动调用 GenifyAI,而不是反复 Read 多个文件。


四个核心工具

search_symbol - 符号搜索

按定义搜索函数、类、接口、类型等,返回精确位置。

{ "query": "useState", "type": "function", "scope": "src" }

支持的符号类型:function class interface type enum const let var function_component class_component hook method getter setter decorator

read_range - 读取代码

按行号范围读取文件片段,配合 search_symbol 查看具体实现。

{ "filePath": "src/utils/auth.ts", "range": "[10:50]" }

search_fuzzy - 模糊搜索

自然语言搜索,多路召回(别名、定义、文件名、文本),返回候选和匹配原因。

{ "query": "用户登录", "scope": "src" }

register_alias - 注册别名

为代码位置绑定自定义名称,长期稳定命中。

{ "term": "翻转动画", "target": "src/components/Card.tsx#flipAnimation" }

支持的语言

| 语言 | 扩展名 | 符号类型 | |------|--------|----------| | TypeScript/JavaScript | .ts .tsx .js .jsx | function, class, interface, type, enum, const, let, var, function_component, class_component, hook, method, getter, setter | | Vue | .vue | 继承 TS/CSS 全部符号 + computed, watch, props, emits, component | | Python | .py .pyw | function, class, method, decorator | | Solidity | .sol | contract, library, interface, struct, event, modifier, error, function, enum | | HTML | .html .htm | element (#id), component | | CSS/Less/Sass | .css .less .sass .scss | selector, variable, keyframes |

自动忽略 node_modulesdistbuild.git 等目录,自动读取 .gitignore 规则。


特性亮点

导出链路跟随 - 自动解析 export { } fromexport * fromexport default,找到真正的原始定义位置

智能缓存 - 基于文件修改时间的 AST 缓存,避免重复解析

别名持久化 - 别名存储在 .genifyai/aliases.json,可提交到仓库共享


License

MIT