Skip to content
@codellm-devkit

Codellm Devkit

A framework that bridges the gap between traditional program analysis tools and Large Language Models (LLMs) specialized for code (CodeLLMs).
CodeLLM-DevKit

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.

Getting Started

pip install cldk
fromcldkimportCLDKfromcldk.analysisimportAnalysisLevelanalysis=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.

Project Structure

Contributing

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.

Reference

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}
}

IBM Public Repository Disclosure

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.

Contact

For any questions, feedback, or suggestions, please contact the authors:

NameEmail
Rahul Krishnai.m.ralk@gmail.com
Rangeet Panrangeet.pan@ibm.com
Saurabh Sinhasinhas@us.ibm.com

Popular repositories Loading

  1. python-sdk python-sdkPublic

    The official Python SDK for Codellm-Devkit

    Python 64 78

  2. codeanalyzer-java codeanalyzer-javaPublic

    Static Analysis on Java source code (and/or binary) using WALA and JavaParser.

    Java 6 2

  3. codeanalyzer-python codeanalyzer-pythonPublic

    Python Static Analysis Backend for CLDK

    Python 4

  4. codeanalyzer-rust codeanalyzer-rustPublic

    Static Analysis on Rust source code (and/or binary) using IR of the Rust Compiler.

    Rust 2

  5. codeanalyzer-typescript codeanalyzer-typescriptPublic

    Typescript/Javascript: Codeanalyzer Backend

    TypeScript 2

  6. typescript-sdk typescript-sdkPublic

    The official Typescript SDK for Codellm-Devkit

    TypeScript 1

Repositories

Showing 10 of 22 repositories

Top languages

Loading…

Most used topics

Loading…