Skip to content

codellm-devkit/cldk-tutorial

Repository files navigation

ICSE 2025 CLDK Tutorial

In this hands on session we will explore the CLDK and its capabilities with a few real-world examples of using the CLDK and LLMs to build:

  1. a code summarization tool: See Code Summarization
  2. a test generation tool: See Test Generation
  3. a code translation tool: See Code Translation

1. Prerequisites

  1. Install CLDK and java bindings. Detailed set-up instructions can be found in the CLDK documentation.
  2. An openrouter API key to access some opensource LLMs. If you don't have an account, you can sign up for free at openrouter.ai/sign-up.

2. Tutorial setup

  1. First, let's clone this repository and navigate to the directory:

    git clone https://github.com/codellm-devkit/cldk-tutorial.git && \
    cd cldk-tutorial
  2. Next, create a .env file in the root directory.

    touch .env

Create openrouter API key

Log in to your openrouter account and create a new API key.

Image Fig 1. Click "Create Key"

Image Fig 2. Generate a name and click "Create"

Image Fig 3. Copy the API key

Copy the API key and paste it into the .env file as follows:

# .env
OPENROUTER_API=sk-rest-of-your_api_key-here
# Ensure to replace 'sk-rest-of-your_api_key-here' with your actual API key

Install dependencies and requirements

Finally, let's install the required dependencies. You can do this by running the following command in your terminal:

python3 -m venv .venv
source .venv/bin/activate
pip install -U -r requirements.txt

Start the Jupyter Notebook server

You have two options to start the Jupyter Notebook server:

  1. Using the command line: Run the following command in your terminal:

    ./.venv/bin/jupyter notebook

    This will start the Jupyter Notebook server and open it in your default web browser.

  2. Recommended: Using VSCode: From inside the cldk-tutorial directory you can open VSCode:

    code .

    This will open the current directory in VSCode. You can then open the Jupyter Notebook files and run them directly from there.

    Make sure to select the correct Python interpreter (the one inside the .venv directory) in VSCode.

    1. You can do this by selecting the Python kernel in the top right corner of the notebook. Image

    2. Choose the Python interpreter from the .venv directory. Image

🏁 End of the tutorial!

Make sure you deactivate the virtual environment when you are done with the tutorial. You can do this by running the following command in your terminal:

deactivate

This will deactivate the virtual environment and return you to your system's default Python environment.

Feedback

Join our community on Discord/Github to discuss CLDK and share your experiences with other users:

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

Name Email
Rahul Krishna [email protected]
Rangeet Pan [email protected]
Saurabh Sihna [email protected]

About

Start building with CLDK!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •