Metadata-Version: 2.4
Name: codesteward-graph
Version: 0.3.0
Summary: Multi-language structural code graph builder — 13 tree-sitter parsers + Neo4j writer
Project-URL: Homepage, https://github.com/bitkaio/codesteward-mcp
Project-URL: Repository, https://github.com/bitkaio/codesteward-mcp
Project-URL: Issues, https://github.com/bitkaio/codesteward-mcp/issues
Project-URL: Changelog, https://github.com/bitkaio/codesteward-mcp/blob/main/CHANGELOG.md
Author: bitkaio LLC
License: BSD-3-Clause
Keywords: ast,code-graph,code-intelligence,neo4j,static-analysis,tree-sitter
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Typing :: Typed
Requires-Python: >=3.12
Requires-Dist: neo4j>=5.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: structlog>=24.0
Provides-Extra: graph
Requires-Dist: tree-sitter-java>=0.23; extra == 'graph'
Requires-Dist: tree-sitter-javascript>=0.23; extra == 'graph'
Requires-Dist: tree-sitter-python>=0.23; extra == 'graph'
Requires-Dist: tree-sitter-typescript>=0.23; extra == 'graph'
Requires-Dist: tree-sitter>=0.24; extra == 'graph'
Provides-Extra: graph-all
Requires-Dist: tree-sitter-c-sharp>=0.21; extra == 'graph-all'
Requires-Dist: tree-sitter-c>=0.21; extra == 'graph-all'
Requires-Dist: tree-sitter-cpp>=0.21; extra == 'graph-all'
Requires-Dist: tree-sitter-go>=0.21; extra == 'graph-all'
Requires-Dist: tree-sitter-java>=0.23; extra == 'graph-all'
Requires-Dist: tree-sitter-javascript>=0.23; extra == 'graph-all'
Requires-Dist: tree-sitter-kotlin>=0.21; extra == 'graph-all'
Requires-Dist: tree-sitter-php>=0.21; extra == 'graph-all'
Requires-Dist: tree-sitter-python>=0.23; extra == 'graph-all'
Requires-Dist: tree-sitter-rust>=0.21; extra == 'graph-all'
Requires-Dist: tree-sitter-scala>=0.21; extra == 'graph-all'
Requires-Dist: tree-sitter-typescript>=0.23; extra == 'graph-all'
Requires-Dist: tree-sitter>=0.21; extra == 'graph-all'
Requires-Dist: tree-sitter>=0.24; extra == 'graph-all'
Provides-Extra: graph-c
Requires-Dist: tree-sitter-c>=0.21; extra == 'graph-c'
Requires-Dist: tree-sitter>=0.21; extra == 'graph-c'
Provides-Extra: graph-cpp
Requires-Dist: tree-sitter-cpp>=0.21; extra == 'graph-cpp'
Requires-Dist: tree-sitter>=0.21; extra == 'graph-cpp'
Provides-Extra: graph-csharp
Requires-Dist: tree-sitter-c-sharp>=0.21; extra == 'graph-csharp'
Requires-Dist: tree-sitter>=0.21; extra == 'graph-csharp'
Provides-Extra: graph-go
Requires-Dist: tree-sitter-go>=0.21; extra == 'graph-go'
Requires-Dist: tree-sitter>=0.21; extra == 'graph-go'
Provides-Extra: graph-kotlin
Requires-Dist: tree-sitter-kotlin>=0.21; extra == 'graph-kotlin'
Requires-Dist: tree-sitter>=0.21; extra == 'graph-kotlin'
Provides-Extra: graph-php
Requires-Dist: tree-sitter-php>=0.21; extra == 'graph-php'
Requires-Dist: tree-sitter>=0.21; extra == 'graph-php'
Provides-Extra: graph-rust
Requires-Dist: tree-sitter-rust>=0.21; extra == 'graph-rust'
Requires-Dist: tree-sitter>=0.21; extra == 'graph-rust'
Provides-Extra: graph-scala
Requires-Dist: tree-sitter-scala>=0.21; extra == 'graph-scala'
Requires-Dist: tree-sitter>=0.21; extra == 'graph-scala'
Description-Content-Type: text/markdown

# codesteward-graph

Multi-language structural code graph builder — parses source repositories into
`LexicalNode` + edge data and writes to Neo4j.

Part of the [Codesteward MCP](https://github.com/bitkaio/codesteward-mcp) project.
For full documentation, setup guides, and the MCP server, see the main repository.

## What it does

- Parses 13 languages via tree-sitter AST (TypeScript, JavaScript, Python, Java, Go,
  Rust, PHP, C#, Kotlin, Scala, C, C++); COBOL via regex
- Extracts functions, classes, imports, call graphs, inheritance chains, and auth guard
  annotations (`GUARDED_BY` / `PROTECTED_BY` edges)
- Resolves cross-file call relationships in a single post-parse pass
- Writes to Neo4j with tenant + repo namespacing; operates in stub mode without Neo4j

## Install

```bash
# Core languages (TypeScript, JavaScript, Python, Java)
uv add "codesteward-graph[graph]"

# All 14 languages
uv add "codesteward-graph[graph-all]"

# Without tree-sitter (COBOL only; all other parsers will raise ImportError)
uv add codesteward-graph
```

## Quick usage

```python
import asyncio
from codesteward.engine.graph_builder import GraphBuilder

async def main():
    builder = GraphBuilder()          # stub mode — no Neo4j
    summary = await builder.build_graph(
        repo_path="/path/to/repo",
        tenant_id="local",
        repo_id="my-repo",
    )
    print(summary)

asyncio.run(main())
```

## License

BSD 3-Clause — Copyright (c) 2026, bitkaio LLC
