Commands

Explore commands for fast access to Pieces features and functionalities in the Pieces CLI.


Pieces CLI Commands

Below is a table containing all the commands available for use in the Pieces CLI.

Command Table

You can easily access these commands through the help menu using the command help within the Pieces CLI. If you’re not within the Pieces CLI, you can use pieces help.

When you’re within the terminal and use the pieces run command, you don’t have to prefix the commands with “pieces”.

Individual Commands

run

Start the CLI in loop mode—you only need to type flags or commands.

run

list

List all materials in your Pieces Drive (alias: drive).

list

list apps

List all registered applications.

list apps

list models

List available AI models and switch which one ask uses.

list models

create

Create a new material from whatever’s on your clipboard.

create

modify

Update the content of the current material.

modify

edit

Change the name or classification of the current material.

edit

share

To share a snippet, enter the pieces share command. After the snippet has been shared, its URL will appear within the terminal, and the CLI will prompt you to open the snippet in a browser.

share

delete

Delete the current (or most recent) material.

delete

execute

Run a Pieces bash material.

execute

clear

Clear the terminal screen.

clear

config

Show your current Pieces CLI configuration.

config

config –editor <editor_name>

Set your preferred code editor (e.g., vim, code).

config -editor ...

install

Type pip install pieces-cli, or if you prefer to use Conda, type conda install pieces-cli.

pip install pieces-cli

As long as Python is set up correctly, Pieces CLI will install.

conda install pieces-cli

open

Open PiecesOS or its helper Applet.

open

ask <your_question_here>

Send a question to Pieces Copilot.

ask ...

-m, –materials

Attach saved items by index (e.g., -m 1 2).

-m ...
-materials ...

-f, –file 

Attach files or folders (absolute or relative paths).

-f ...
-file ...

chats

List all your past conversations.

chats

chat

Show messages in your current conversation.

chat

chat  <number>

Switch to and display a specific conversation by its number.

chat ...

-n

Start a new conversation.

-n

-d

Delete the conversation you’re currently in.

-d

-r 

Rename your current conversation (e.g., -r “Project Ideas”).

-r ...

Fuzzy-search your materials and chats.

search ...

–mode ncs

Use Neural Code Search for your query.

-mode ncs

–mode fts

Use Full-Text Search for your query.

-mode fts

commit

Commit changes to GitHub and auto-generate the message; add -p or –push to push immediately.

commit ...

login

Log in to your Pieces Cloud account.

login

logout

Log out of your Pieces Cloud account.

logout

version

Show versions of PiecesOS and the CLI tool.

version

help

Display the help message.

help

onboarding

Walk through the initial setup process.

onboarding

feedback

Send feedback directly to the Pieces team.

feedback

contribute

Contribute code or ideas to the CLI project.

contribute
Updated on