Cody for JetBrains is now generally available

Cody for JetBrains IDEs is now generally available for all users. It offers better performance, increased stability, and new features to help you stay in flow and reduce day-to-day toil in your workflow.

The JetBrains extension now supports new commands, inline code edits, and all of Cody’s staple features like multi-line autocomplete, hot-swappable LLMs, and multi-repo context search.

Download Cody for JetBrains

Better autocomplete with more hotkeys

Cody provides multi-line autocomplete as you type. We’ve squashed some visual and performance bugs, and the autocomplete experience is much more polished.

We’ve also added new hotkeys for using autocomplete:

  • Tab to accept a suggestion
  • Alt + [ (Windows) or Opt + [ (macOS) to cycle suggestions
  • Alt + \ (Windows) or Opt + \ (macOS) to manually trigger autocomplete

Chat with multi-repo context

We’ve updated Cody’s sidebar chat interface and improved the UX for selecting repositories to use as context.

You will now see an interface in the sidebar for selecting chat context, and you can toggle local project context on or off.

If you’re a Cody Enterprise user, you will also have the option of adding remote repositories from your Sourcegraph instance. You can type the name of your repos into this interface and select up to 10. Cody will search against those repos and retrieve relevant files to answer your chat prompts.

Watch the full video walkthrough on multi-repo context on YouTube.

LLM switching

Cody is designed around the principle of choice; it works with multiple IDEs, any git code host, and various LLMs to fit your preferences.

Cody Pro users can hot-swap between multiple of the latest models from the extension, including GPT-4o, Claude 3 Opus, Mixtral 8x22B, and others.

Refreshed commands to keep you in flow

Cody has grown beyond the chat window and can now edit code directly in your files. We’ve used this functionality to rebuild Cody’s commands and split them into two categories: edit commands and chat commands.

Chat commands are the commands you are already using. They return outputs from Cody in the chat window. These are:

  • Explain Code: Explains a code snippet or file at a high level, including key properties, arguments, and algorithms
  • Smell Code: Analyzes a selected code snippet and provides suggestions for how to improve quality

Edit commands trigger code edits directly in your files (and sometimes in net-new files). These commands are new in this release and include:

  • Edit Code
  • Document Code
  • Generate Unit Tests

Edit code

This command lets you prompt Cody to perform direct edits (like refactors or bug fixes) on any code selection.

Select the code you want to edit and press Shift + Ctrl + Enter. This hotkey opens a floating edit box where you can describe the change you want to make. You can also reposition and adjust the edit box size on your screen. Use the Up arrow to cycle through previous prompts.

Once you submit your prompt, Cody will implement the change. You can accept, undo, or view a diff for the change or iterate on your prompt and have Cody retry the change.

You can also place the cursor on a blank line in your file without highlighting any code. In this case, the command will insert code at the cursor according to your prompt.

Learn more about the Edit Command with this YouTube video walkthrough.

Generate unit tests

This command replaces Cody’s old unit testing command, which was limited to outputting test code in the chat window. Now, when you prompt Cody to generate unit tests, it will:

  • Determine if you’re using a test framework
  • Determine if you already have a test file created
  • Insert new unit tests directly in the existing test file or create a new file if none exists

Try the new command in the Cody sidebar or with the Shift + Ctrl + T hotkey.

Document code

We’ve also rebuilt Cody’s documentation command, and Cody will insert docs directly into your file instead of generating docs in a sidebar chat window.

You can trigger the documentation command with the Shift + Ctrl + H hotkey.

Learn to use the Document Code command with this YouTube walkthrough.

GPT-4o support for Pro and Enterprise

OpenAI’s latest model, GPT-4o, is now available for Pro and Enterprise users. It’s two times faster than GPT-4 Turbo and beats its general reasoning benchmark scores.

You can use GPT-4o for chat and commands, and the model's speed makes it an excellent option for code edit commands. Cody Pro users will see GPT-4o as an option in the LLM dropdown menu today. Cody Enterprise admins can choose GPT-4o as an option for their teams once they update their Sourcegraph instance to the latest version (coming later this week).

You can also try it in our LLM Litmus Test at Sourcegraph Labs.

LLM selection dropdown

Expanded context windows

For anyone who missed it, we rolled out new context windows for Cody Free and Cody Pro users in v5.5.8. Cody now supports way more context when used with Claude 3 models. This means a few things:

  • You send more context to Cody when asking questions. You can @-mention more and larger files that would’ve previously gone over the context limit
  • You can have far longer back-and-forth chats with Cody before it forgets the context from earlier in the conversation. Previously, Cody would tend to “forget” context early in a conversation when the total amount of context was too large

We’ve also expanded Cody’s output token limit, meaning answers won’t get cut off mid-text anymore. You can read more about context token limits in the docs.

Stability and performance improvements

We’ve squashed some bugs and significantly improved the JetBrains extension's performance and stability. We expect all JetBrains users to feel these improvements, and Apple Silicon users will see much greater stability.

Thank you to our community

Thank you to all of our JetBrains beta users. Your feedback has allowed us to bring the JetBrains extension to GA. We appreciate all of your thoughtful insights, requests, and support.

If you’re new to Cody, we’d love your feedback too! You can submit feedback along with questions and comments to our support forum.

Get started with Cody

If you have an existing Free, Pro, or Enterprise account, you can install Cody for JetBrains.

If you don’t yet have a Cody account, create one for free.

Get Cody, the AI coding assistant

Cody makes it easy to write, fix, and maintain code.