Pieces for Obsidian Extension
It gives users a simple way to manage and use saved code snippets through the Pieces Drive, using the AI-powered features of the Pieces Copilot, all directly within their development environment.
-
Pieces Copilot: Engage in AI-driven conversations to enhance productivity by providing contextual assistance for your projects—helping with code comprehension, comments, troubleshooting, and more—all by adding files and folders as context, with or without the powerful Long-Term Memory Engine (LTM-2).
-
Pieces Drive: Effortlessly save, find, and share your frequently used code snippets to your Pieces Drive. This makes it easy to organize your work, quickly access important code, and collaborate effectively with others.

Explore troubleshooting options, navigate to our support page, or directly book a call with our engineers.
Pieces Quick Guides help you quickly understand and effectively utilize powerful features like the Long-Term (LTM-2) Memory Engine and Pieces Copilot. Click here to get started.
This extension is designed to offer two main pillars of functionality for developers working in the Obsidian editor—AI assistance with the Pieces Copilot and developer material management within the Pieces Drive.
Enhanced AI Assistance
Through the Pieces for Obsidian Plugin, developers can enhance productivity by engaging in context-based AI conversations—contextualized with the relevant notes and folders, all within Obsidian.
Integrated Snippet Management
With Pieces Drive and PiecesOS embedded in Obsidian, developers can save, search, and share their code snippets, boosting productivity by keeping reusable code easily accessible and organized within their notes and project files.
Using Pieces Copilot
The Pieces for Obsidian Plugin enhances your workflow by enabling you to save, manage, and share snippets directly within Obsidian. It offers features like snippet enrichment, sharing via custom links, and seamless integration with your development environment.
To explore available options, simply select the pieces logo below a code snippet.
From here, you’ll find several quick actions, including:
-
Save and Manage Snippets
: Effortlessly save your code snippets to Pieces Drive for easy access and organization. -
Snippet Enrichment
: Automatically generate tags, descriptions, and related links for your code snippets, enhancing their context and usability. -
Sharing Capabilities
: Share your code snippets with others via custom links, facilitating collaboration and knowledge sharing. -
Integration with Development Tools
: Seamlessly integrate with your development environment, allowing for efficient code management and retrieval.
Managing Your Code Snippets
Saving and managing code snippets with Pieces in the Obsidian plugin is simple and efficient.
To save a snippet, right-click the selected code, hover over Pieces
, and choose Save Current to Pieces
. You can also use the Share via Pieces Link
option to share snippets with others, making collaboration easier within your notes and project files.
Common snippet types include utility functions, API requests, and reusable code blocks.
When you save snippets to your Pieces Drive with Pieces in Obsidian, they are enriched with AI-generated metadata, such as tags, titles, authorship details, and descriptions, keeping everything organized and easily accessible.
Here are some brief descriptions of the different material management options available within the Pieces for Obsidian Plugin:
-
Saving
: Save selected code or text snippets directly to your Pieces repository for easy access later. -
Enriching
: Automatically add relevant metadata like tags, titles, and descriptions to improve the organization of your snippets. -
Sharing
: Share snippets with your team, enabling collaboration and knowledge exchange. -
Searching
: Quickly search your saved snippets using keywords, tags, or other metadata to find the relevant code or text when needed.
Referencing & Reusing
The Pieces for Obsidian Plugin offers powerful search tools to quickly find and access your snippets saved to Pieces Drive. You can search using keywords, tags, or other metadata, making it easy to locate relevant snippets within your notes and projects.
In Obsidian, you can perform broad searches or refine results using specific terms like function names, keywords, or tags, making it easy to locate the exact snippet you need.
To search for snippets, open your Obsidian Vault and navigate to the Pieces plugin in the sidebar.
From there, you can use the search bar at the top of the Pieces panel to input your query. You can search by specific terms, tags, or even parts of snippets.
Once you find the snippet you're looking for, you can easily insert it directly into your note or project by selecting Insert At Cursor
. Once found, snippets shared or copied directly into your project.
Download the Plugin
Ready to streamline your development? Download the Pieces for Obsidian Plugin and follow our installation guide to start.