Code-Graph-RAG Programming Languages: Complete Support Matrix and Multi-Language Analysis

Code-Graph-RAG supports 14 programming languages—including Python, JavaScript, TypeScript, Java, C, C++, C#, Go, Rust, PHP, Dart, Lua, and Scala (in development)—using Tree-sitter parsers to construct a unified, language-agnostic knowledge graph that enables cross-language code analysis.

Code-Graph-RAG (vitali87/code-graph-rag) is a polyglot code analysis engine that transforms source code repositories into queryable knowledge graphs. Unlike single-ecosystem tools, Code-Graph-RAG programming languages support covers systems languages, web frameworks, and scripting environments through a single, unified parsing architecture based on Tree-sitter.

Complete Language Support Matrix

The authoritative list of Code-Graph-RAG programming languages is maintained in docs/architecture/language-support.md, which defines parsing status, file extensions, and extracted constructs for each language. The engine currently supports 13 fully supported languages plus Scala in active development.

Language Status Extensions Functions Classes/Structs Modules Package Detection Additional Features
C Fully Supported .c ✓ ✓ ✓ ✓ Functions, structs, unions, enums, pre‑processor includes
C# Fully Supported .cs ✓ ✓ ✓ – Namespaces, classes/structs/records/interfaces/enums, generics, inheritance, using directives

| C++ | Fully Supported | .cpp, .h, … | ✓ | ✓ | ✓ | ✓ | Constructors, destructors, operator overloading, templates, lambdas, C++20 modules, pre‑processor macros | | Dart | Fully Supported | .dart | ✓ | ✓ | ✓ | – | Classes, mixins, extensions, enhanced enums, Flutter widgets, package/relative imports | | Go | Fully Supported | .go | ✓ | ✓ | ✓ | – | Receiver methods, structs, interfaces, type declarations | | Java | Fully Supported | .java | ✓ | ✓ | ✓ | – | Generics, annotations, records, sealed classes, concurrency | | JavaScript | Fully Supported | .js, .jsx, .mjs, .cjs | ✓ | ✓ | ✓ | – | ES6 modules, CommonJS, prototype & object methods, arrow functions | | Lua | Fully Supported | .lua | ✓ | – | ✓ | – | Local/global functions, metatables, closures, coroutines | | PHP | Fully Supported | .php | ✓ | ✓ | ✓ | – | Classes, interfaces, traits, enums, namespaces, PHP 8 attributes | | Python | Fully Supported | .py | ✓ | ✓ | ✓ | ✓ | Type inference, decorators, nested functions | | Rust | Fully Supported | .rs | ✓ | ✓ | ✓ | ✓ | impl blocks, associated functions, macro_rules! macros | | TypeScript (TSX) | Fully Supported | .tsx | ✓ | ✓ | ✓ | – | Full TypeScript plus JSX components | | TypeScript | Fully Supported | .ts, .mts, .cts | ✓ | ✓ | ✓ | – | Interfaces, type aliases, enums, namespaces, ES6/CommonJS modules | | Scala | In Development | .scala, .sc | ✓ | ✓ | ✓ | – | Case classes, objects |

How Tree-Sitter Powers Language Agnosticism

Code-Graph-RAG achieves broad programming languages coverage through Tree-sitter, a fast incremental parser that provides a uniform AST representation across all grammars. The LanguageSpec class in codebase_rag/language_spec.py orchestrates this process by discovering Tree-sitter grammars, registering file extensions, and mapping AST node types to unified graph entities.

This architecture means that any language with an existing Tree-sitter grammar can be integrated into the engine. The codebase_rag/constants/languages.py file contains the programmatic enumeration of supported languages used during parser registration.

Unified Graph Schema for Cross-Language Queries

All supported languages share a single graph schema, enabling polyglot analysis where queries work identically across different languages. Whether analyzing Python decorators or Rust macros, the graph represents entities like Function, Class, and Module using consistent node labels and relationships.

This design allows you to query across Python, Java, Rust, and other languages simultaneously without rewriting query logic. The schema abstracts language-specific syntax into common software constructs, making it possible to find all functions named handle_request across a microservice architecture written in multiple languages.

Working with Supported Languages in Code

The CodeGraphRAG class in codebase_rag/main.py provides the primary interface for building graphs from supported languages. Below are practical examples of loading repositories and executing language-agnostic queries.

Initializing the Engine and Building the Graph

from codebase_rag import CodeGraphRAG

# Initialise the engine (the default config enables all supported languages)

cgr = CodeGraphRAG(root_path="/path/to/my_repo")
cgr.build_graph()          # Parses every source file that matches the supported extensions

Running Cross-Language Cypher Queries


# Query for all functions named "handle_request" regardless of language

query = """
MATCH (f:Function {name: "handle_request"})
RETURN f.file_path, f.start_line, f.language
"""
results = cgr.query_cypher(query)
for r in results:
    print(f"{r['language']} – {r['file_path']}:{r['start_line']}")

Command-Line Interface for Language Analysis

The CLI implementation in codebase_rag/cli.py supports exporting graphs from specific language projects:


# Export the graph of a Python project

python -m codebase_rag.cli export-graph --root /path/to/python_proj --output graph.json

Extending Language Support

Adding new programming languages to Code-Graph-RAG requires only an existing Tree-sitter grammar. The core parser discovers the grammar, registers associated file extensions, and maps AST node types to the unified graph schema. This extensibility ensures that emerging or domain-specific languages can be integrated without modifying the engine's core query logic.

Summary

  • Code-Graph-RAG supports 14 programming languages: 13 fully supported (C, C#, C++, Dart, Go, Java, JavaScript, Lua, PHP, Python, Rust, TypeScript, TypeScript TSX) plus Scala in development.
  • Tree-sitter foundation: All languages are parsed using Tree-sitter grammars through the LanguageSpec class in codebase_rag/language_spec.py.
  • Unified schema: A single graph representation enables queries across multiple languages simultaneously.
  • File locations: Language definitions reside in docs/architecture/language-support.md and codebase_rag/constants/languages.py.
  • Polyglot API: The CodeGraphRAG class and CLI tools work identically across all supported languages.

Frequently Asked Questions

How many programming languages does Code-Graph-RAG support?

Code-Graph-RAG currently supports 14 programming languages. Thirteen are fully supported (C, C#, C++, Dart, Go, Java, JavaScript, Lua, PHP, Python, Rust, TypeScript, and TypeScript TSX), while Scala is marked as in development. The support matrix in docs/architecture/language-support.md provides the definitive list.

Can I analyze multiple languages in the same knowledge graph?

Yes. Code-Graph-RAG uses a single, language-agnostic graph schema that represents functions, classes, and modules consistently across all supported languages. You can load a repository containing Python, JavaScript, and Rust code simultaneously, then run Cypher queries that match entities across all three languages without modifying the query syntax.

How do I add a new programming language to Code-Graph-RAG?

You can extend support to any language with an existing Tree-sitter grammar by modifying the language-specific configuration. The LanguageSpec class in codebase_rag/language_spec.py handles grammar discovery, file extension registration, and AST-to-graph mapping, allowing new languages to integrate into the unified schema.

Where is the language support configuration defined?

The primary configuration resides in two locations: the human-readable support matrix in docs/architecture/language-support.md documents coverage and features, while the programmatic enumeration in codebase_rag/constants/languages.py drives the parser registration logic used during graph construction.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →