Artificial Intelligence 8 min read

Integrating DeepSeek AI Assistant into IntelliJ IDEA for Java Development

This guide walks you through preparing the environment, installing the CodeGPT plugin, configuring DeepSeek with API keys, and using its code generation, completion, explanation, and question‑answer features inside IntelliJ IDEA, while also showing how to monitor token usage.

Code Ape Tech Column
Code Ape Tech Column
Code Ape Tech Column
Integrating DeepSeek AI Assistant into IntelliJ IDEA for Java Development

In early 2025, AI tools surged in China, and DeepSeek quickly became popular among developers. For Java programmers, integrating DeepSeek into IntelliJ IDEA via the CodeGPT plugin provides an intelligent assistant that boosts coding efficiency.

1. Environment preparation – Use IntelliJ IDEA 2023.x or newer and install the CodeGPT plugin (a powerful AI‑driven code assistant). Ensure Python 3.7+ is installed and added to the system PATH.

Macbook:GithubCommitSpace Aion$ python --version
Python 3.12.8
Macbook:GithubCommitSpace Aion$

2. Install DeepSeek plugin – Open IDEA, go to Settings (Windows/Linux) or IntelliJ IDEA → Preferences (macOS), select Plugins → Marketplace , search for CodeGPT , and install it. Restart IDEA after installation.

3. Configure DeepSeek – Obtain an API key from https://www.deepseek.com/ (API Open Platform). In IDEA’s CodeGPT settings, add the API key, set the chat model URL to https://api.deepseek.com/chat/completions , and choose the model deepseek-chat . For the reasoning model, enable code completions, select the DeepSeek Coder FIM template, set the URL to the same endpoint, and choose the model deepseek-reasoner .

After applying these settings, DeepSeek is ready for use.

4. Using DeepSeek – In the CodeGPT panel, select Custom OpenAI and type prompts such as “Write a Java method to filter numbers and provide tests”. The assistant returns full code, e.g.:

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

Code completion works with Ctrl+Space , code explanation can be invoked via right‑click → CodeGPT , and problem solving via CodeGPT: Ask Question .

5. Token usage statistics – DeepSeek provides daily token consumption and cost details on its website, allowing you to monitor API usage and expenses.

Conclusion – By following these steps you can successfully integrate DeepSeek into IDEA, leverage AI‑assisted coding, and enjoy increased productivity in Java development.

JavaDeepSeekCodeGPTIntelliJ IDEAAI code assistantPlugin integration
Code Ape Tech Column
Written by

Code Ape Tech Column

Former Ant Group P8 engineer, pure technologist, sharing full‑stack Java, job interview and career advice through a column. Site: java-family.cn

0 followers
Reader feedback

How this landed with the community

login 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.