Snippet Discovery
The Snippet Discovery feature in Pieces for Developers helps you quickly find and add multiple code snippets from your files or folders.
Accessing Snippet Discovery
Open the Power Menu by clicking the home icon next to the search bar in the Pieces for Developers Desktop App, or press ⌘+return
(macOS) and ctrl+enter
(Windows/Linux).
Select Snippet Discovery
from the dropdown to begin.
The Snippet Discovery page can only be accessed through the Power Menu
at this time.
Features
This feature lets you utilize Pieces to research and scan local code repositories for useful code snippets. Once found, they can be saved directly to your Pieces Drive.
Drag & Drop Files or Folders
On the Snippet Discovery page, a large drag-and-drop area awaits your files or folders.
Simply drop your code files or an entire folder, and Pieces will begin scanning them for snippets.
Discovering Snippets
After your files or folders are uploaded, Pieces scans them for potential code snippets.
You’ll see a “We discovered X snippets” screen, where X
is the total number of snippets found.
Three actions appear at the top-right:
-
Start Over
: Resets the view, allowing you to drag in a new file or folder. -
Select All
: Toggles all snippets to be selected or deselected at once. -
Save All
: Saves every discovered snippet in a single action. Once you click it, a loading indicator shows progress (e.g., Adding 18 of 26).
Selecting and Saving Snippets
Each snippet shows a +
sign by default.
Click Select All
to change every +
to a -
, which means all snippets are ready to be saved. If you only want certain snippets, click the +
next to each one you want to include.
When you’re ready, the button at the top-right displays a Save All
message if all snippets are selected, or Save # of Selected Snippets
if only some are chosen.
As each snippet saves successfully, you’ll see a small green check mark in its bottom-right corner.
Partial Saves & Continuing
You don’t have to save every snippet immediately.
Feel free to save a subset of snippets (e.g., Save X Snippets
), leave others for later, or select more as you go.
If you decide to start fresh with a different file or folder, click Start Over
to discard the current session.
Exiting Snippet Discovery
Click the Back Arrow
in the top-left corner to leave the Snippet Discovery page.
A prompt appears to confirm whether you want to exit without saving additional snippets or return to finish saving them.
You can also click esc
(macOS/Windows/Linux).