A framework that bridges the gap between traditional program analysis tools and Large Language Models (LLMs) specialized for code (CodeLLMs).
This is the TypeScript SDK for the Codellm-Devkit (CLDK). The SDK provides a unified interface for integrating outputs from various analysis tools and preparing them for effective use by CodeLLMs. It allows developers to streamline the process of transforming raw code into actionable insights.
To install the SDK, you can use bun, npm, or yarn. Run the following command in your terminal:
Using npm
npm i @codellm-devkit/cldk
Using yarn
yarn add @codellm-devkit/cldk
Using bun
bun add @codellm-devkit/cldk
Create a Temporary Directory
mkdir cldk-quickstart cd cldk-quickstartInitialize a Bare Project
bun init -y
This creates a minimal
package.jsoninstantly.Install
@codellm-devkit/cldkbun add @codellm-devkit/cldk
Create a file
test-analysis.tswith the following content:import{CLDK}from"cldk";// Initialize Java analysisconstanalysis=CLDK.for("java").analysis({projectPath: "/path/to/your/java/project",analysisLevel: "Symbol Table",});// Retrieve structured application modelconstjApplication=awaitanalysis.getApplication();console.log("Parsed JApplication:",jApplication);// Retrieve the symbol tableconstsymbolTable=awaitanalysis.getSymbolTable();console.log("Symbol Table:",symbolTable);
Run the Script
bun test-analysis.ts
Clone the repository:
git clone https://github.com/codellm-devkit/typescript-sdk.git cd typescript-sdkIf you don't have it already, pleaes install
Bun:curl -fsSL https://bun.sh/install | bashNote: follow any post-installation instructions to complete the installation
Install the dependencies
bun install
Run tests:
bun run test
If you don't, ensure you have Docker/Podman and a compatible editor (e.g., VS Code) with the Dev Containers extension installed.
Open the repository in your editor. When prompted, reopen the project in the dev container. The devcontainer is configured to come pre-installed with bun and all the necessary dependencies.
You can start by run tests:
bun run test