Skip to content

JetBrains AI

JetBrains IDEs (IntelliJ IDEA, WebStorm, GoLand, PyCharm, etc.) include an AI Assistant with LM Studio integration that speaks the OpenAI-compatible API. Since candela listens on the same port (:1234), it works with zero additional configuration.

candela is designed to be a drop-in replacement for LM Studio’s API endpoint. JetBrains IDEs auto-detect models from http://localhost:1234/v1/models.

  1. Start candela:

    Terminal window
    candela start
  2. Open JetBrains Settings:

    • Navigate to Settings → Tools → AI Assistant
    • Enable “LM Studio” as a provider
  3. Select a model from the dropdown — it auto-populates from Candela’s /v1/models endpoint, showing both local and cloud models

That’s it. Every AI Assistant interaction now flows through Candela.

Feature Traced
AI chat panel
Inline code completions
Code explanations
Refactoring suggestions
Commit message generation
Test generation

If auto-detection doesn’t work, configure manually:

  1. Settings → Tools → AI Assistant → LM Studio
  2. Set URL to http://localhost:1234
  3. The model list should populate automatically

If you’re using the JetBrains AI Studio plugin:

  1. Settings → AI Studio → Providers
  2. Add a new OpenAI-compatible provider:
Setting Value
Name Candela
API URL http://localhost:1234/v1
API Key candela
  1. Add models manually or use the auto-detect feature

If you run multiple JetBrains IDEs simultaneously (e.g., GoLand + WebStorm), they all share the same candela instance on :1234. Traces from all IDEs appear in the same management UI.

The candela-jetbrains plugin adds real-time cost visibility and budget controls directly inside your JetBrains IDE — no terminal switching required.

  • Status bar cost tracker — live 🔥 1.2M · $2.45 · 🟢45% in the bottom bar, auto-refreshing every 60s
  • Rich hover tooltips — input/output token splits, request counts, model-by-model breakdown, grant details
  • Budget warning balloons — notifications when usage crosses your threshold (default 80%), red alerts when exhausted
  • Grant display — active bonus grants with remaining amounts and expiry countdowns
  • Offline backoff — shows 🕯️ offline when Candela isn’t running, backs off to 5-minute polling to avoid noise
  • Startup health check — brief notification on project open confirming connection
  • AI chat panel — integrated chat window for conversing with LLMs directly in the IDE
  • Focus chat shortcut — press Cmd+Shift+L (macOS) or Ctrl+Shift+L (Windows/Linux) to instantly focus the chat panel from anywhere in the IDE
  • Progress indicators — visual feedback for model loading, thinking state, and dashboard data fetching
  • Context-aware editor actions — sends file path, imports, enclosing class/function, and line range to the LLM for richer, more relevant responses
  • Graceful error handling — network failures, timeouts, and unexpected errors display user-friendly messages with retry options and backoff
Shortcut Platform Action
Cmd+Shift+L macOS Focus the Candela chat panel
Ctrl+Shift+L Windows / Linux Focus the Candela chat panel

When you invoke Candela from the editor (e.g., explain code, refactor, generate tests), the plugin automatically enriches the request with:

Context Example
File path src/main/kotlin/com/example/Service.kt
Imports import kotlinx.coroutines.flow.*
Enclosing class/function class UserService / fun fetchUser()
Selected line range Lines 42–67

This additional context helps the LLM generate more accurate, project-aware responses without manual copy-pasting.

The plugin shows visual feedback at each stage of an AI interaction:

  • Model loading — spinner while the model initializes
  • Thinking indicator — animated indicator while the LLM processes your request
  • Dashboard fetch — loading state when retrieving cost and usage data
  1. Go to the latest release
  2. Download candela-jetbrains-x.x.x.zip (not the source code archives)
  3. In your IDE, open Settings → Plugins
  4. Click the ⚙️ gear iconInstall Plugin from Disk…
  5. Select the downloaded .zip file
  6. Click OK and Restart IDE
Terminal window
git clone https://github.com/candelahq/candela-jetbrains.git
cd candela-jetbrains
nix develop -c ./gradlew buildPlugin
# Output: build/distributions/candela-jetbrains-*.zip

Then install the .zip from disk using steps 3–6 above.

Configure under Settings → Tools → Candela:

Setting Default Description
Server URL http://localhost:8181 Candela server URL
Status bar enabled true Show cost tracker in status bar
Refresh interval 60s Auto-refresh interval (0 to disable)
Budget warning threshold 80% Warning percentage threshold

Access from Tools → Candela or via the command palette:

Action Description
Show Cost Summary Detailed token/cost breakdown with model-by-model stats
Check Budget Budget meter with remaining balance and active grants
Open Dashboard Launch the Candela web dashboard in your browser
Refresh Status Force refresh status bar data

The plugin is built for production-grade reliability:

  • Structured concurrency — all async operations are managed through CandelaCoroutineService, a project-scoped coroutine service that ensures clean lifecycle management. No leaked coroutines or fire-and-forget tasks.
  • Stream identity checks — a monotonic streamGeneration counter prevents stale UI callbacks. All four callback sites (onToken, onComplete, onError, and CancellationException) are guarded against out-of-order updates from cancelled or superseded streams.
  • Exponential backoff with jitter — status bar refresh uses randomized exponential backoff to avoid thundering-herd issues and reduce noise when the server is unreachable.

The plugin handles failures gracefully at every layer:

Scenario Behavior
Network timeout Displays inline error with retry option; backs off polling interval
Server unreachable Status bar shows 🕯️ offline; polling interval increases to 5 minutes
Stream interrupted Stale callbacks are discarded via stream generation guard; UI remains consistent
Unexpected exception Caught by structured concurrency scope; logged and surfaced as a non-blocking notification
Terminal window
# Enter dev shell (JDK 21 + Gradle + Kotlin)
nix develop
# Run sandboxed IDE with plugin loaded
nix develop -c ./gradlew runIde
# Build distribution
nix develop -c ./gradlew buildPlugin
# Run tests (covering lifecycle, streaming, UI, and error handling)
nix develop -c ./gradlew test