Discover and explore top open-source AI tools and projects—updated daily.
kreuzberg-devTree-sitter language parser compilation with polyglot bindings
Top 76.8% on SourcePulse
Summary This project simplifies integrating syntax analysis by bundling over 300 tree-sitter language parsers into a single package with polyglot native bindings. It targets developers needing comprehensive language support within applications, eliminating the need to manage individual parser dependencies for efficient syntax analysis.
How It Works
A Rust core library manages 306 tree-sitter grammars, providing native bindings for Python, Node.js, Go, Java, Elixir, Ruby, and C/C++ FFI. Key features include on-demand parser downloads and local caching, enabling selective installation. All bindings expose a unified process() function for extracting structured code intelligence like functions and classes from source code.
Quick Start & Requirements
Installation varies by language: Rust (cargo add tree-sitter-language-pack), Python (pip install tree-sitter-language-pack), Node.js (npm install @kreuzberg/tree-sitter-language-pack), Go (go get github.com/kreuzberg-dev/tree-sitter-language-pack/packages/go), Java (Maven/Gradle dependency, JDK 22+), Elixir ({:tree_sitter_language_pack, "~> 1.0"}), Ruby (gem install tree_sitter_language_pack), PHP (composer require kreuzberg/tree-sitter-language-pack), .NET (dotnet add package TreeSitterLanguagePack), and WebAssembly (npm install @kreuzberg/tree-sitter-language-pack-wasm). A CLI tool (cargo install ts-pack-cli) is available. Prerequisites include specific language runtimes and build tools. Official READMEs for each binding offer detailed instructions.
Highlighted Details
process() API across all language bindings for consistent code analysis.Maintenance & Community Part of the Kreuzberg.dev ecosystem (document intelligence, web crawling, LLM clients). A Discord community is available for discussion and support. Specific contributor or sponsorship details are not detailed in the provided README.
Licensing & Compatibility Licensed under MIT. All bundled tree-sitter grammars use permissive licenses (MIT, Apache-2.0, BSD, ISC, or similar), explicitly excluding copyleft licenses. This permissive licensing is suitable for commercial use and integration into closed-source applications.
Limitations & Caveats The WebAssembly binding includes a subset of 30 languages; full support requires native bindings. Java integration requires JDK 22+. C/C++ FFI bindings need building from source within the workspace.
11 hours ago
Inactive