How to Seamlessly Integrate DeepSeek AI into IntelliJ IDEA for Java Development

This step‑by‑step guide shows Java developers how to prepare the environment, install the CodeGPT plugin, configure DeepSeek API keys, set up chat and inference models in IntelliJ IDEA, and then use the assistant for code generation, completion, explanation, and troubleshooting, complete with screenshots and example code.

Java Web Project
Java Web Project
Java Web Project
How to Seamlessly Integrate DeepSeek AI into IntelliJ IDEA for Java Development

Introduction

The article begins by noting the rapid rise of AI coding assistants in 2025 and introduces DeepSeek as a high‑performance tool that can be integrated into IntelliJ IDEA to boost Java development productivity.

1. Environment Preparation

IDEA version : Use IntelliJ IDEA 2023.x or newer for optimal compatibility with the CodeGPT plugin, which serves as the proxy for DeepSeek.

Python installation : Install Python 3.7+ and add it to the system PATH so the DeepSeek helper can run. Example command on macOS:

python --version
Python 3.12.8

2. Install the CodeGPT Plugin

Open IDEA, go to Settings (Windows/Linux) or IntelliJ IDEA → Preferences (macOS).

Select Plugins, switch to the Marketplace tab, search for "CodeGPT", view details and click Install.

Restart IDEA when prompted.

3. Configure DeepSeek

3.1 Create an API Key

Visit https://www.deepseek.com/, open the API Open Platform, and generate an API key under the "API keys" menu.

3.2 Set Up DeepSeek in IDEA

In IDEA, open the settings for the installed CodeGPT plugin and locate the Custom OpenAI section. Fill in three parts:

API Key : Paste the key created in step 3.1.

Chat model :

URL: https://api.deepseek.com/chat/completions Model name: deepseek-chat Inference model :

Enable Enable code completions and Parse response as Chat Completions.

FIM template: DeepSeek Coder.

URL: same as chat model.

Model name: deepseek-reasoner.

Click Apply and OK to save the configuration.

4. Using DeepSeek in Coding

4.1 Getting Ideas and Code

Open the CodeGPT component, select Custom OpenAI, and type a prompt such as "Use Java to write a method that filters numbers and provide a test". The assistant returns complete code, for example:

public class TestNumberFilter {
    public static String filterNumbers(String input) {
        // Use regex to keep only digits
        return input.replaceAll("[^0-9]", "");
    }
    public static void main(String[] args) {
        String testInput2 = "SSFSDFS结论萨芬122432的噶大都是4无人区是14认识832safsss";
        String result = filterNumbers(testInput2);
        System.out.println("Filtered numbers: " + result); // Output: 123456
    }
}

4.2 Code Completion

While typing, press Ctrl + Space (or a custom shortcut) and DeepSeek analyses the surrounding context to suggest the next code fragment, dramatically speeding up development.

4.3 Code Explanation

Select a code block, right‑click, and choose CodeGPT. DeepSeek returns a natural‑language description of the logic, helping with maintenance and debugging.

4.4 Asking Questions

Highlight code or describe an issue, then choose CodeGPT: Ask Question. The assistant provides targeted solutions, acting as an on‑demand programming mentor.

5. DeepSeek Usage Statistics

The article shows screenshots of the token usage dashboard on DeepSeek’s website, illustrating daily token consumption and associated cost for the "deepseek-chat" model.

Conclusion

By following the outlined steps, developers can successfully embed DeepSeek into IntelliJ IDEA, leveraging AI‑driven code generation, completion, explanation, and troubleshooting to enhance Java development efficiency.

DeepSeekCodeGPTIntelliJ IDEAJava developmentAPI integrationAI coding assistant
Java Web Project
Written by

Java Web Project

Focused on Java backend technologies, trending internet tech, and the latest industry developments. The platform serves over 200,000 Java developers, inviting you to learn and exchange ideas together. Check the menu for Java learning resources.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.