How to Generate Shareable Links
There are 3 ways to share saved snippets—by using the tool menu, right-click menu, or by the Pieces Actions button on previously-saved snippets within the Pieces Drive.
This link can easily be shared via email, Discord, Slack, or other platforms. The recipient can view the snippet without needing to have a Pieces account.
via Right-Click Menu
Shareable Pieces links for your code snippets can be generated by right-clicking a portion of selected code, then clicking Share via Pieces Link.
via Command Palette
You can open the command palette using ⌘+p (macOS) or ctrl+p (Windows/Linux), type Pieces: Share via Pieces, and run the command to generate and copy a shareable link.
via Pieces Actions
When you are inside the Markdown Preview window in Obsidian, you can toggle the Pieces icon to unroll the Pieces Actions, then click Share via Pieces to generate a shareable link that’s automatically copied to your keyboard.
Sharing a Previously Saved Snippet
If you save a material, but didn’t generate a shareable link at the time—no problem. You can still generate a shareable link (or copy, regenerate or delete the existing link) from the Pieces Drive.
<Callout type="info">
  Alternatively, use the `Quick Menu` (three-dot icon) button to access sharing options
</Callout>
  
Enriched Sharing Experience
When you Share a snippet, it’s not just the code that’s included. The snippet comes with additional metadata to provide context—you can read more about that here.
Snippet Type: Identify the language or framework, such as Python or React.Tags: Useful keywords for quick categorization.Description: A short summary of what the snippet does.Related Links: Helpful resources or documentation tied to the snippet.Author Information: A record of who created the snippet.
What Information Gets Shared
When a snippet is saved to the Pieces Cloud, the code is enriched with valuable information such as related people, links, annotations, tags, and an automatically-generated description.
Sensitive Information Watchdog
The Share feature does more than allow you to effectively share snippets across your entire team and other communities, though.
You'll see a section titled Sensitive Information:
Our in-house ML model scans snippets for potentially sensitive information, like API keys or passwords, and alerts you so that you can make an informed decision before sharing the snippet.
The scan happens locally using on-device machine learning models before the snippet is uploaded to the drive for sharing. This allows you to make an informed decision about sharing your code.