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

kibi-plugin-treesitter

v2.0.0

Published

Offline multi-language Tree-sitter symbol extraction

Downloads

631

Readme

Kibi Tree-sitter plugin

This package provides the kibi.symbol-extractor.v2 capability for Python, Go, Rust, Java, C#, PHP, C, C++, Bash, Ruby, Terraform, and generic HCL source files. It returns syntax-derived declarations with explicit ok, partial, unsupported, or failed status for the exact source text it receives.

The package contains its pinned grammar WebAssembly files and parser queries. The runtime is web-tree-sitter 0.27.0. Catalog metadata records the upstream source commits, registry package integrity, parser ABI, query provenance, and SHA-256 digests. C and C++ header files use explicit language selection because .h alone cannot distinguish them. PHP analysis uses the mixed HTML/PHP grammar so declarations around embedded HTML remain visible. The shell catalog covers Bash syntax; .sh files use that subset, while a shebang naming a different or unknown interpreter returns unsupported.

At analysis time the plugin reads only its installed files and source text. It does not fetch grammars, run compilers, invoke the analyzed program, load language toolchains, evaluate Terraform, or expand macros. Parsing runs in a small pool of persistent workers (at most four, one fewer than the available CPUs) with bounded input, output symbols, and wall-clock time. Each worker loads a grammar once and serves one file at a time; a worker that times out or fails is replaced, and workers are recycled after 256 analyses. The wall-clock budget is the host-granted timeoutMs, capped at 10 seconds. Node workers configure 64 MiB old-generation heap, 16 MiB young-generation heap, and a 4 MiB stack. Bun ignores the Node resourceLimits option, so those heap and stack caps are not enforced there; see its Node compatibility documentation. WebAssembly linear memory and total process RSS are not separately capped in either runtime. The worker is not an operating-system sandbox.

ok means the selected syntax queries returned supported declaration forms without detected parse or coverage gaps; it is not proof of the complete runtime symbol set. Java, C#, and C++ overload locators preserve source-level parameter spelling; C++ method signatures also include const, volatile, and ref qualifiers. The analyzer does not resolve aliases, generic substitutions, or language-specific type equivalence. C/C++ includes, conditional compilation, and invoked declaration macros return partial; exact prototypes and definitions collapse within one file only when their supported signatures match, while unresolved collisions remain distinct with source-local locators and partial status. Python decorators, metaclasses, and exec(), Rust macro invocations, duplicate PHP declarations, dynamic Ruby method APIs/redefinitions, and Bash eval, sourced files, conditional declarations, and duplicate names also remain explicit partial-analysis cases.

Terraform and generic HCL output static labeled blocks as unknown structural symbols with precise nativeKind; Terraform locals attributes are variable symbols. Provider and terraform metadata blocks are omitted. Dynamic/escaped labels, unsupported Terraform block types, nested Terraform blocks, unlabeled generic HCL blocks, and nested HCL blocks are reported as uncovered. These records describe configuration structure and do not imply executable code or proof-bearing functions. HCL labels use JSON-escaped segment identities; source-local suffixes are only a way to preserve colliding declarations, not semantic identities.

Syntax errors omit damaged candidates and return partial while retaining clean declarations. Unsupported extensions return unsupported; oversize inputs, parser startup errors, and worker timeouts return failed. A valid file with no supported declarations can return an empty ok result. See catalog.json, integrity.json, SBOM.spdx.json, and THIRD_PARTY_NOTICES.md for the complete shipped component record.