AD SPACE AVAILABLE · BRAND PARTNERS WELCOME

How to Use Pieces and GitHub Copilot for Cross-IDE Snippet Workflows

Félix Briones · 365Finds Editorial
Indexed 88,650 Wiki articles

Put 365 Wiki to work with your AI

Copy the prompt below, paste it into the AI you already use, then ask your question.

Download full Skill

Try it with the prompt first. If you use 365 Wiki often, install the full 365Wiki Skill so you do not have to paste it again. No regular AI? Gemini or Microsoft Copilot on the web will work.

365Wiki Skill

GitHub Copilot writes code fast, but its attention span is short. It lives in the active buffer or the repository open right now. The moment you switch from a TypeScript front-end in VS Code to a backend service in IntelliJ IDEA, that meticulously refined authentication pattern or database transaction wrapper vanishes from Copilot's horizon. You either re-prompt from scratch and hope for the same clean output, or you dig through closed terminal tabs and old pull requests.

At 365Finds, we find this context amnesia frustrating. Developers do not work in a single file or a single editor.

Pieces solves this specific friction. Powered by its local background engine (PiecesOS), Pieces operates as a cross-IDE memory layer. Instead of treating code snippets like dead text in a clipboard manager, Pieces auto-enriches them with language tags, descriptive titles, related web links, and dependency context using on-device machine learning. When you bridge Pieces and GitHub Copilot—especially through the Model Context Protocol (MCP)—you get persistent, cross-editor reuse for the exact patterns Copilot helps you generate.

Here is the exact setup and workflow 365Finds recommends.


The Core Concept: Dividing Labor

Before touching settings, understand why pairing these two tools makes sense:

If you rely on Copilot alone for reuse, you are gambling on non-deterministic generation. If you rely on traditional snippet plugins, you spend half your day typing metadata and tags manually. The combination eliminates both chores.

+-----------------------------------------------------------+
|                       Your Workflow                       |
|                                                           |
|  [ VS Code + Copilot ]               [ JetBrains / Other ]|
|          |                                     ^          |
|    Generate & Refine                           | Retrieve |
|          v                                     | & Adapt  |
|  +-----------------------------------------------------+  |
|  |           PiecesOS (Local Engine & LTM)             |  |
|  |   - Auto-detection & Syntax Classification          |  |
|  |   - Automatic Semantic Tagging & Descriptions       |  |
|  |   - Model Context Protocol (MCP) SSE Server         |  |
|  +-----------------------------------------------------+  |
+-----------------------------------------------------------+

Step 1: Install and Connect PiecesOS Across Your IDEs

Pieces is not just a lightweight editor plugin; it relies on a local background runtime called PiecesOS.

  1. Install PiecesOS and the Desktop App: Download and install PiecesOS for macOS, Windows, or Linux from the official Pieces website. PiecesOS runs locally on your machine, handles on-device embeddings, and keeps snippet processing private.
  2. Install IDE Extensions:
    • Visual Studio Code: Install the Pieces for Developers extension from the VS Code Marketplace.
    • JetBrains IDEs (IntelliJ IDEA, PyCharm, WebStorm, etc.): Install the Pieces plugin from the JetBrains Marketplace.
  3. Verify Background Connection: Open both IDEs. When PiecesOS is running, the Pieces status icon in the IDE status bar lights up. Any snippet captured in VS Code is now instantly visible in the JetBrains Pieces sidebar, and vice versa.

Step 2: Capture Copilot's Validated Output

When coding with GitHub Copilot, you frequently generate custom logic that requires minor manual adjustments before it works flawlessly. Do not save raw, unverified AI output. Once a snippet passes tests in your editor:

  1. Select the Target Block: Highlight the validated function, regex rule, configuration block, or SQL query.
  2. Execute the Save Action:
    • VS Code: Press Shift + Alt + V (Windows/Linux) or Shift + Cmd + V (macOS), or right-click and choose Save to Pieces.
    • JetBrains: Press Alt + Shift + P (Windows/Linux) or Option + Shift + P (macOS), or right-click -> Pieces -> Save to Pieces.
  3. Background Capture (Pieces Long-Term Memory): If you enable Long-Term Memory (LTM) in PiecesOS settings, Pieces can passively observe code blocks you copy or interact with frequently. However, at 365Finds, we strongly prefer manual explicit capture (Save to Pieces). It prevents your snippet library from cluttering up with throwaway debugging logs and temporary mocks.

Step 3: Let Pieces Auto-Tag and Enrich

What sets Pieces apart from Gists or basic snippet managers is automatic contextual enrichment.

The moment you send a snippet to PiecesOS:

You can inspect and fine-tune these tags in the Pieces desktop app or IDE sidebar. In our experience, Pieces' local models get tags right roughly 85% to 90% of the time on modern web and cloud stacks, saving significant manual labeling effort.


Step 4: Retrieve and Reuse in a Different IDE

Here is where the cross-IDE workflow pays off. Suppose you authored a reliable exponential-backoff retry utility inside VS Code while working on a Node.js microservice. Later, you are in PyCharm or IntelliJ writing a Go or Python daemon that interacts with the same endpoint.

  1. Invoke Pieces Search:
    • In JetBrains or VS Code, open the Pieces Explorer view, or trigger the Pieces quick-search shortcut (Ctrl + Shift + P / Cmd + Shift + P -> Pieces: Search Snippets).
  2. Search by Intent, Not Exact Syntax: You do not need to remember exact variable names. Type retry backoff http or filter by tag #network. Pieces uses vector search on your local embeddings to surface the relevant snippet.
  3. Insert or Adapt: Hit Enter to insert the snippet directly at your cursor.

Step 5: Power GitHub Copilot with Pieces via MCP

The most powerful synergy occurs when GitHub Copilot queries Pieces directly. Through the Model Context Protocol (MCP), PiecesOS exposes an SSE (Server-Sent Events) endpoint that connects your local snippet repository to Copilot Chat.

Configuring the Pieces MCP Endpoint

  1. Open Pieces Desktop App -> Settings -> Model Context Protocol (MCP).
  2. Locate the local SSE endpoint URL, which resembles:
    http://localhost:39300/model_context_protocol/2024-11-05/sse
    
  3. In your MCP client configuration (such as your VS Code MCP server configuration file or agent tool config), register the Pieces MCP server:
    {
      "mcpServers": {
        "pieces": {
          "url": "http://localhost:39300/model_context_protocol/2024-11-05/sse",
          "transport": "sse"
        }
      }
    }
    
  4. Restart your editor or reload the MCP connection.

Prompting Copilot with Your Pieces Library

Once linked, open GitHub Copilot Chat in any supported environment and reference your stored knowledge:

"Check my Pieces snippets for the custom database connection pool pattern we used last week, and adapt it for this new asyncpg connection file."

Copilot uses MCP to query PiecesOS, retrieves the exact, validated snippet along with its enriched tags, and uses that grounded context to generate production-ready code. You avoid hallucinated APIs because Copilot builds directly on your vetted snippet foundation.


Where the Workflow Bites: Honest Trade-offs

365Finds does not view Pieces as an unalloyed lightweight utility. You should weigh several realities before rolling this into team workflows:

The 365Finds Verdict

GitHub Copilot gives you speed; Pieces gives you persistence. Treating Copilot as your memory bank leads to wasted prompts and inconsistent codebases. By running PiecesOS as the dedicated local context hub, you turn disposable Copilot completions into an organized, cross-IDE asset library.

References