One analysis interface over every language: call graphs, symbol tables, and reachability — program analysis your agents can call.
Documentation | Quickstart | Discussions
CodeLLM-DevKit (CLDK) loads a codebase and hands you back a typed object model of it with classes, methods, fields, and call graphs (among other things) through one consistent analysis object. Instead of token-heavy crawls through files to answer questions like "what calls this method?" or "is this code reachable?", agents and developers can run precise, deterministic lookups against the actual program. The result is grounded answers from ground truth rather than approximations from grepping.
Java, Python, and TypeScript are supported today, with Go, Rust, and C in development.
- 📚 Read the Documentation for guides, core concepts, and common tasks
- ✨ Browse usage examples and tutorials
- 💻 Install the Python SDK and query your project:
pip install cldkfrom cldk import CLDK
from cldk.analysis import AnalysisLevel
analysis = CLDK.python(
project_path="/path/to/python/project",
analysis_level=AnalysisLevel.call_graph,
)
print(len(analysis.get_classes()), "classes")
print(analysis.get_call_graph())Swap CLDK.python(...) for CLDK.java(...) or CLDK.typescript(...) — the query API is the same across languages. The Java backend is bundled, so analyzing Java projects needs only a JDK on your PATH.
- python-sdk - official Python SDK (
cldkon PyPI) - typescript-sdk - official TypeScript SDK (experimental)
- codeanalyzer-java - static analysis for Java/JavaEE using WALA and JavaParser
- codeanalyzer-python - static analysis backend for Python
- codeanalyzer-typescript - static analysis backend for TypeScript/JavaScript
- cldk-tutorial - start building with CLDK
We welcome contributions of all kinds! Whether you want to fix bugs, improve documentation, or propose new features, please see our contributing guide to get started.
Have questions? Join the discussion in our community forum or Discord server.
To cite Codellm-Devkit, please use the following reference:
@article{krishna2024codellm,
title={Codellm-Devkit: A Framework for Contextualizing Code LLMs with Program Analysis Insights},
author={Krishna, Rahul and Pan, Rangeet and Pavuluri, Raju and Tamilselvam, Srikanth and Vukovic, Maja and Sinha, Saurabh},
journal={arXiv preprint arXiv:2410.13007},
year={2024}
}Codellm-devkit is an open source project from IBM Research and open to contributions from the entire community. All content in these repositories including code has been provided by IBM under the associated open source software license and IBM is under no obligation to provide enhancements, updates, or support. IBM developers produced this code as an open source project (not as an IBM product), and IBM makes no assertions as to the level of quality nor security.
For any questions, feedback, or suggestions, please contact the authors:
| Name | |
|---|---|
| Rahul Krishna | i.m.ralk@gmail.com |
| Rangeet Pan | rangeet.pan@ibm.com |
| Saurabh Sinha | sinhas@us.ibm.com |