TSG Indexer
by entrepeneur4lyf
TSG Indexer is a Rust library for indexing code repositories using Tree-sitter Stack Graphs. It's designed to analyze code structure and capture relationships between definitions and references across files.
Last updated: N/A
What is TSG Indexer?
TSG Indexer is a Rust library that uses Tree-sitter Stack Graphs to analyze code repositories and build a graph representation of the code structure. This graph captures the relationships between definitions and references across files, enabling powerful code navigation and analysis.
How to use TSG Indexer?
To use TSG Indexer, add it as a dependency to your Cargo.toml file. You can then use the library's API to index code and build stack graphs. The CLI can be used to index files and directories directly from the command line.
Key features of TSG Indexer
Support for 20+ programming languages
Recursive directory traversal
Multiple output formats (JSON, DOT graph)
Optional CLI and LSP support via feature flags
Use cases of TSG Indexer
Code navigation
Reference finding
Integration with MCP servers
Code analysis tools
FAQ from TSG Indexer
What is Tree-sitter?
What is Tree-sitter?
Tree-sitter is a parser generator tool and an incremental parsing library.
What are Stack Graphs?
What are Stack Graphs?
Stack Graphs are a data structure used to represent the relationships between definitions and references in code.
What languages are supported?
What languages are supported?
The library supports over 20 languages including Rust, Python, JavaScript, TypeScript, Java, and more.
How do I enable CLI support?
How do I enable CLI support?
Enable the cli
feature flag when adding the dependency to your Cargo.toml.
What output formats are supported?
What output formats are supported?
The library supports JSON and DOT graph output formats.