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

@yandy0725/pi-coding-tools

v0.5.3

Published

pi package enabling ls/find/grep built-in tools

Readme

pi-coding-tools

启用 ls/find/grep 内置工具的 Pi 扩展包。

功能

  • ls/find/grep:启用这些默认关闭的内置工具。

AST/LSP 代码理解工具

新增 5 个 token-efficient 工具,让 LLM 用最少 token 理解代码库:

| 工具 | 用途 | 机制 | |------|------|------| | ast_grep_search | 按 AST 结构搜索代码(比 grep 精准,不匹配注释/字符串) | ast-grep CLI | | ast_grep_replace | AST-aware 重写代码(dry-run 预览,apply=true 写盘) | ast-grep CLI -r/-U | | lsp_symbols | 文件骨架大纲(比 read 省 ~95% token) | LSP documentSymbol | | lsp_hover | 查符号类型/文档(唯一能答"这表达式什么类型") | LSP hover | | lsp_navigate | 语义跳转:定义在哪 / 谁在用(operation: definition|references) | LSP definition/references |

支持语言

| 语言 | LSP 服务器 | 安装 | |------|-----------|------| | TypeScript/JavaScript | typescript-language-server | npm i -g typescript-language-server | | Python | pyright | npm i -g pyright | | Java | jdtls | Eclipse JDT LS(需 JDK 17+) | | Kotlin | kotlin-language-server | fwcd/kotlin-language-server | | C/C++ | clangd | apt install clangd / brew install llvm(需 compile_commands.json) |

ast_grep_search 支持 ts/tsx/js/python/java/kotlin/c/cpp,无需 LSP。

ast-grep 二进制

ast_grep_search 需要 ast-grep(或 sg)二进制。安装:npm i -g @ast-grep/cli / cargo install ast-grep / brew install ast-grep

配置

coding-tools.json 中可开关每个工具(默认全 true),并可整体关 LSP 或覆盖服务器:

{
  "ast_grep_search": true,
  "ast_grep_replace": true,
  "lsp_symbols": true,
  "lsp_hover": true,
  "lsp_navigate": true,
  "lsp": { "disabled": false, "servers": { "clangd": { "disabled": true } } }
}

安装

pi install npm:@yandy0725/pi-coding-tools

配置

配置文件控制哪些工具处于启用状态。所有工具默认启用。

全局配置

~/.pi/agent/coding-tools.json

{
  "ls": true,
  "find": true,
  "grep": true
}

项目级配置

<project>/.pi/coding-tools.json(覆盖全局配置):

{
  "grep": false
}

字段说明

| 字段 | 默认值 | 说明 | |-------|---------|------| | ls | true | 启用 ls 内置工具 | | find | true | 启用 find 内置工具 | | grep | true | 启用 grep 内置工具 | | ast_grep_search | true | 启用基于 AST 的代码搜索工具 | | ast_grep_replace | true | 启用基于 AST 的代码重写工具(默认 dry-run) | | lsp_symbols | true | 启用 LSP 文档符号工具 | | lsp_hover | true | 启用 LSP 悬停(类型/文档)工具 | | lsp_navigate | true | 启用 LSP 定义/引用工具 | | lsp | — | LSP 配置块(disabledservers 覆盖) |