Pieces for JetBrains Plugin

The Pieces for JetBrains Plugin enhances your development experience by seamlessly integrating the best features from the Pieces suite directly into JetBrains IDEs, making your favorite tools readily accessible within your workspace.

It provides developers with powerful tools for managing code snippets, debugging, and refactoring within their familiar development environment.

  • Pieces Copilot: Users can start generative AI conversations and add files and folders as context to get the solutions they need, including out-of-IDE context with the optional Long-Term Memory Engine (LTM-2.7).

  • Pieces Drive: Effortlessly save, locate, and share frequently used code snippets, making it easier to organize your work, quickly access essential pieces of code, and collaborate effectively with others.

  • AI Quick Actions: Fully integrated and Pieces-powered AI Quick Actions tools are built right into your code, making it even easier to access Pieces Copilot explanation and documentation features.
Follow [these instructions](/products/extensions-plugins/jetbrains/get-started) to download and install the Pieces for JetBrains plugin. Explore [troubleshooting options](/products/extensions-plugins/jetbrains/troubleshooting), navigate to our [support page](/products/support), or directly book a call with our engineers. All media (e.g., GIFs, screenshots) in this documentation were captured in **PyCharm CE.**

The Pieces for JetBrains Plugin verifies against the JetBrains IntelliJ Ultimate IDE, but works across the entire JetBrains suite of IDEs.

The minimum version required for the Pieces for JetBrains Plugin to work in your JetBrains IDE is 2023.1.

If you’re not quite sure what version your JetBrains IDE is, you can click here to find out how to check it.

This plugin is currently available for use in any JetBrains IDE, such as:

The Pieces for JetBrains plugin provides developers with two pillars of functionality:

AI Assistance with Pieces Copilot

Pieces Copilot offers AI-assisted features like starting contextualized generative AI conversations, adding code comments, and troubleshooting code.

Material Management with Pieces Drive

Pieces Drive enables you to save, edit, search, and share useful code snippets to boost your workflow productivity and streamline collaboration with others.

These features let developers store their favorite code in a personal, easy-to-access library. They can quickly review past work, find related authors and links with the extra details saved with each piece, and more.

Using Pieces Copilot

You can perform several decisive actions with the Pieces Copilot inside of your JetBrains IDE, like starting a conversation directly inside the editor with your LLM of choice about a specific code snippet, fragment, folder, or terminal output.

The Ask Copilot feature is the backbone of the Pieces Copilot experience.

Pieces recently rolled out its new AI Quick Actions feature—similar to VS Code’s Codelens—which allows for select quick actions powered by Pieces Copilot, namely Pieces: Explain and Pieces: Comment.

The Quick Action tools—`Pieces: Explain` and `Pieces: Comment`—are above the function nearest to your cursor.

Using either AI Quick Actions triggers the Pieces Copilot conversation window, where you can find the output from the LLM of your choice.

These AI Quick Action tools live above certain pieces of code, like functions, so you always have easy access to them.

Managing Code Snippets

When you save code to your personal repository, Pieces automatically enriches the snippet with AI-generated tags, titles, related authors and links, and a description.

You can save code snippets by right-clicking a selection of code and choosing the Save Current Selection to Pieces option from the pop-up window.

Alternatively, right-click and hover over the Pieces item to access several other snippet-related functions.

Other material management actions available in this menu include:


Action Purpose
Save Current Selection / File to Pieces Right-click a selected block of code or your entire active file and save it to your Pieces Drive with AI-enriched metadata, ensuring easy access to frequently used snippets.
Save File to Pieces Save an entire file to Pieces Drive for future reference.
Ask Copilot About Selection Ask Pieces Copilot to generate suggestions or explain the selection with a query.
Modify Selection with Copilot Adjust and refine selected code using AI suggestions.
Comment Selection with Copilot Auto-generate comments for the selected code snippet using AI.
Explain Selection with Copilot Receive an explanation for the code using your chosen LLM through Pieces Copilot.
Share via Pieces Link Generate a shareable link for your snippet, allowing collaboration even with those who don’t have a Pieces account.
Search Pieces Drive Search for previously saved snippets in Pieces.
Pieces Quick Search Quickly find and retrieve relevant snippets saved in Pieces.

Referencing & Reusing

The Pieces for JetBrains Plugin provides robust search tools to help you quickly find and access your saved snippets.

You can easily find saved snippets in your JetBrains IDE by double-tapping the shift key and selecting the Pieces window.

Enter a query, and any snippet you’ve saved that matches the query will be returned to the drop-down list.

Once you’ve located the snippet you want, pressing return (macOS), enter (Windows/Linux), or clicking the snippet title will open it inside your JetBrains IDE.


Download the Plugin

Follow the installation instructions to get started with the Pieces for JetBrains Plugin.