Skip to main content

Commands

Use the following commands to streamline your workflow and boost productivity with the Pieces CLI.

General Commands

run

Starts the CLI in a loop for continuous interaction.

pieces run

clear

Clears the terminal screen while staying in the command loop.

pieces clear

version

Displays the version of Pieces OS and the CLI.

pieces version

help

Displays a detailed help menu.

pieces help

Asset Management

list

Lists assets, applications, or models.

List Assets

Lists your most recent assets. Default is 10 assets.

pieces list

List Recent Assets

Displays your x most recent assets.

pieces list assets x

List Applications

Lists all registered applications.

pieces list apps

List AI Models

Lists all accessible AI models.

pieces list models

open

Opens an asset from a list or search. If only "open" is used, it opens the most recent asset.

pieces open [ITEM_INDEX]

save

Saves changes to the current asset. You need to edit the snippet code that was opened via the open command and then save the changes using the save command.

pieces save

create

Creates a new asset from the clipboard content. The asset will automatically be scanned and recognized for its file type.

pieces create

edit

Edits the name and classification of the current asset.

Edit Name

pieces edit --name "new name"

Edit Classification

pieces edit --classification python

You can also use -n or -c to change the name and classification respectively with the edit command.

delete

Deletes the current or specified asset. If no asset is specified, it will prompt to delete the most recent asset.

pieces delete

Search and Query

Performs a search for assets.

Finds strings that approximately match patterns. Normal search.

pieces search [your query]

Uses machine learning to understand the intent of a user's search query and match it with the most relevant results.

pieces search query --mode ncs

Examines all words in a document to find matches to search criteria.

pieces search query --mode fts

Conversation Management

conversations

Lists all conversations. The green conversation is the one currently in use in the ask command.

pieces conversations

conversation

Manages individual conversations.

List Messages in Current Conversation

Lists the messages in the conversation currently being used in the ask command.

pieces conversation

Create a New Conversation

Creates a new conversation.

pieces conversation -n

Rename a Conversation

Renames the current conversation.

pieces conversation -r "new name"

Or you can make the model rename it for you.

pieces conversation -r

Delete a Conversation

Deletes the current conversation.

pieces conversation -d

Switch Conversation

Switches the conversation and lists its messages. Check the conversations command to get the index.

pieces conversation x

Integration

commit

Auto-commits code to GitHub with a generated commit message. Use the -p or --push flags to push the code to the repository as well.

pieces commit -p

You can also add the -i or --issues flags so the commit message will include the issue numbers in the commit if found, or it will list all issues to choose from.

pieces commit -i

login

Logs in to your Pieces account.

pieces login

logout

Logs out from your Pieces account.

pieces logout