Enterprise backend engineers frequently assume that modern AI coding assistants belong exclusively to Visual Studio Code, treating JetBrains IDEs as second-class citizens. When working with IntelliJ IDEA on complex multi-module Maven or Gradle architectures, developers often get boxed into proprietary solutions like JetBrains AI Assistant or GitHub Copilot, both of which restrict model choice and enforce rigid cloud data pipelines.
Code GPT breaks this constraint. Operating inside IntelliJ IDEA (as well as PyCharm, WebStorm, and PhpStorm), Code GPT brings vendor-agnostic LLM integration directly into JetBrains' static analysis ecosystem. At 365Finds, our assessment is straightforward: pairing IntelliJ IDEA's AST engine with Code GPT delivers superior architectural sovereignty. It allows enterprise teams to connect private local runtimes (such as Ollama), internal OpenAI-compatible gateways (vLLM, LiteLLM), or commercial frontier APIs (Claude 3.7 Sonnet, GPT-4o), while indexing multi-module repositories for semantic codebase retrieval.
This guide provides a comprehensive, production-ready walkthrough to install Code GPT in IntelliJ IDEA, configure custom and local providers, and index complex multi-module enterprise projects without exhausting system memory or corrupting context embeddings.
1. System Requirements and Environment Preparation
Before installing the plugin, ensure your development environment satisfies Code GPT's runtime prerequisites:
- JetBrains IDE: IntelliJ IDEA (Ultimate or Community) version 2022.1 or newer.
- Java Development Kit: JDK 17 or higher.
- Internal Runtime Engine: Code GPT automatically provisions and manages an internal Node.js runtime (v18.15.0) to drive its background services and semantic search pipeline.
- Port Availability (Critical): The plugin establishes a local loopback IPC bridge on ports 54112 or 54113. Ensure your corporate firewall, VPN client, or local Docker containers do not occupy or intercept these ports.
- Verification on Linux/macOS: Run
lsof -i -P | grep LISTEN | grep -E ':54112|:54113'. - Verification on Windows: Run
netstat -ano | findstr :54112.
- Verification on Linux/macOS: Run
- Hardware Allocation: A minimum of 8 GB RAM is required; 16 GB to 32 GB is strongly advised when building local vector indices for multi-module projects or running local inference.
2. Installing the Code GPT Plugin in IntelliJ IDEA
You can install Code GPT through JetBrains Marketplace or via manual disk archive.
Method A: JetBrains Marketplace (Recommended)
- Launch IntelliJ IDEA and open your target project.
- Open Settings:
- macOS:
IntelliJ IDEA->Settings(orPreferences). - Windows/Linux:
File->Settings(shortcut:Ctrl + Alt + S).
- macOS:
- Select Plugins from the left-hand navigation menu.
- Switch to the Marketplace tab, enter
CodeGPTin the search field, and locate CodeGPT: Chat & AI Agents (developed by DanielSanMedium / Judini). - Click Install, accept third-party plugin notices, and restart the IDE when prompted.
Method B: Manual Installation from Disk
In air-gapped corporate environments without direct Marketplace access:
- Download the plugin archive (
.zip) from the official JetBrains Marketplace repository. - In IntelliJ IDEA, navigate to
Settings->Plugins. - Click the gear icon (⚙️) in the upper-right corner and select Install Plugin from Disk....
- Choose the downloaded
.zipfile, confirm installation, and restart IntelliJ IDEA.
Once restarted, a dedicated Code GPT tool window appears on the IDE's right-hand dock.
3. Configuring Custom LLM Providers and API Keys
Code GPT offers three integration models: local private LLMs, custom enterprise completion endpoints, and Bring-Your-Own-Key (BYOK) cloud providers.
Option A: Local Sovereign LLMs via Ollama (Air-Gapped & Zero Telemetry)
For proprietary banking, healthcare, or internal enterprise backends where source code cannot traverse external networks, local execution is mandatory.
- Install and Run Ollama:
Ensure Ollama is installed and running on your local workstation or intranet server. By default, its daemon binds to
http://localhost:11434. - Pull a Capable Coding Model:
Execute the pull command in your terminal:
365Finds Recommendation: On workstations with 16 GB to 24 GB RAM,ollama pull qwen2.5-coder:14bqwen2.5-coder:14bstrikes the optimal balance between inference speed, context retention, and Java syntax comprehension. On machines equipped with 32 GB+ unified memory or dedicated VRAM, deployqwen2.5-coder:32b. - Configure Code GPT:
- Open the Code GPT tool window in IntelliJ IDEA.
- Click the model selector or settings gear icon.
- Under the provider category, select Local LLMs and choose Ollama.
- Specify the server endpoint:
http://localhost:11434. - Pick your pulled model (
qwen2.5-coder:14b) from the model dropdown.
- Tune the Context Window (
num_ctx): Standard Ollama instances default to a 2,048 or 4,096 token context window, which silently truncates multi-module code retrieved during RAG queries. Create an explicit OllamaModelfileor configure your model parameters withnum_ctx 16384ornum_ctx 32768to support cross-module snippets.
Option B: Custom OpenAI-Compatible Endpoints (vLLM / LiteLLM Gateways)
Enterprise platform teams often host centralised model instances behind an internal API gateway.
- Open the Code GPT tool window settings in IntelliJ IDEA.
- In the model selection panel, navigate to LLMs Cloud model and select Custom.
- Supply the following fields:
- Model Name: The exact deployment identifier recognized by your gateway (e.g.,
hosted-deepseek-coderorcorporate-mistral-large). - API Key: Your internal bearer token or gateway secret.
- Endpoint URL: The full completion route, such as
https://ai-gateway.internal.corp/v1/chat/completions.
- Model Name: The exact deployment identifier recognized by your gateway (e.g.,
- Click Connect. Code GPT securely retains credentials in IntelliJ IDEA's local secure credential store.
Option C: Cloud Providers via BYOK (Bring Your Own Key)
If your corporate data policy allows public cloud inference with commercial Data Processing Agreements (DPAs):
- In the Code GPT settings panel, select providers like Anthropic, OpenAI, Google AI Studio, or DeepSeek.
- Enter your personal or organization API key.
- Select your target frontier model (e.g., Claude 3.7 Sonnet or GPT-4o).
4. Indexing Multi-Module Projects for Project-Wide Context Awareness
Single-file context fails in enterprise architectures. A typical backend system involves multiple subprojects—such as order-service-api, order-service-core, order-service-infrastructure, and common-utils. Code GPT's Codebase Indexing (Augmented Context) scans project source trees, builds a local vector database, and enables semantic search across disparate modules.
Pre-Index Preparation: Clean Build Artifacts
In Maven and Gradle multi-module projects, auto-generated files, compiled bytecode, and dependency caches will corrupt vector indices:
- Maven: Generated files under
target/, annotation processor outputs, QueryDSL / MapStruct classes, and.classfiles. - Gradle: Output directories under
build/,.gradle/, and build caches. - Frontend Modules:
node_modules/in monorepo structures.
Mandatory Action:
- Run a clean build command before indexing:
# For Maven multi-module: mvn clean # For Gradle multi-project: ./gradlew clean - Verify that your root
.gitignoreexcludestarget/,build/,.gradle/,.idea/,*.class, and*.jar. Code GPT respects.gitignorerules during workspace scans.
Executing the Indexing Process
- Open the Code GPT tool window in IntelliJ IDEA.
- In the top navigation bar of the panel, click the Codebase or Augmented Context button.
- Click Create Codebase Index (or Select Folder to Index).
- Scope Selection:
- Monolithic Repositories (< 250k lines of code): Select the project root folder. Code GPT scans all child modules recursively.
- Large Distributed Monorepos (> 50 submodules): Do not index the entire root blindly. Instead, select the primary domain service module along with your core shared library module.
- Monitor progress while Code GPT parses syntax trees and generates vector embeddings. The process runs locally without dispatching code to Code GPT servers.
Preventing Out-of-Memory (OOM) Errors in IntelliJ IDEA
Generating embeddings for tens of thousands of classes across multiple modules places significant heap pressure on both the IDE and the embedded Node.js process:
- In IntelliJ IDEA, navigate to
Help->Edit Custom VM Options. - Increase your heap ceiling:
-Xms2048m -Xmx8192m - Save and restart IntelliJ IDEA before launching a massive indexing job.
5. Querying Multi-Module Logic with @codebase
Once indexed, queries reference cross-module dependencies seamlessly. Prefix your chat prompts with the @codebase tag to trigger semantic retrieval across all indexed modules.
@codebase In order-service-core, explain how OrderCreatedEvent is constructed and trace which listener in notification-service processes it.
@codebase Identify all implementations of PaymentGateway across our submodules and point out any discrepancy in exception handling.
@codebase Where is the JWT authorization filter registered, and how does common-security share authentication claims with customer-api?
The underlying Semantic Search engine identifies relevant method signatures, DTOs, and interface declarations, injecting targeted chunks into the model's prompt context rather than exhausting window limits with whole files.
6. 365Finds Research Judgment and Best Practices
| Architecture Choice | Primary Advantage | Major Limitation | 365Finds Institutional Verdict |
|---|---|---|---|
Local Ollama (qwen2.5-coder:14b) | Absolute code privacy; zero external network egress; zero token fees | Demands 16 GB+ RAM; slower inference during massive RAG lookups | Recommended for proprietary enterprise code where compliance strictly bans cloud APIs. |
| Internal vLLM / LiteLLM Gateway | Pooled enterprise compute; unified access controls; custom model weights | Requires DevOps setup and internal network maintenance | Best choice for mid-to-large engineering orgs standardizing on self-hosted infra. |
| BYOK Frontier Cloud (Claude 3.7 / GPT-4o) | State-of-the-art multi-module reasoning; rapid code generation | Token consumption costs; data must clear corporate DPAs | Recommended for rapid architectural refactoring when external API compliance is granted. |
Operational Rulebook:
- Never Re-Index Without Cleaning: Always run
mvn cleanor./gradlew cleanprior to refreshing the codebase index. Stale.classfiles and decompiled dependencies will introduce severe hallucinations into semantic search results. - Watch the Port 54112 Collision: If Code GPT displays persistent connection failures or fails to initialize chat, terminate conflicting background Node or Docker instances binding to
54112or54113. - Combine Static Analysis with Semantic Search: Code GPT does not replace IntelliJ IDEA's native refactoring engines (e.g.,
Shift + F6rename, structural search, type hierarchy). Use Code GPT to understand architectural intent across modules, but rely on IntelliJ's static compiler graph for safety-critical refactoring.