Editing
Keeping an up-to-date library of code snippets in the Pieces CLI is easy with seamless editing.
How to Edit Snippets
Follow the steps below to edit a saved material in the Pieces CLI.
Access your saved snippets with the `list` command.
Use your mouse wheel or arrow keys to scroll and select a snippet by pressing `return` (macOS) or `enter` (Windows/Linux).
Any changes made and saved within your IDE will update the Pieces Drive automatically, allowing you to use the changed snippet immediately.
<Image src="https://storage.googleapis.com/hashnode_product_documentation_assets/cli_assets/pieces_drive/edit_update/editing_saving.gif" alt="" align="center" fullwidth="true" />
How to Rename Snippets
With the Pieces CLI, you can rename saved materials and have those changes apply universally throughout your Pieces Drive—follow the steps below to learn how.
Use your mouse wheel or arrow keys to scroll and select a snippet by pressing `return` (macOS) or `enter` (Windows/Linux).
This will open a new prompt for you to change the name and classification for the snippet.
<Image src="https://storage.googleapis.com/hashnode_product_documentation_assets/cli_assets/pieces_drive/edit_update/edit_command.png" alt="" align="center" fullwidth="true" />
When you’re complete, the snippet will update across your Pieces Drive automatically.