Skip to content

Commit

Permalink
Merge branch 'main' into issue-templates
Browse files Browse the repository at this point in the history
  • Loading branch information
shivay-at-pieces authored Aug 7, 2024
2 parents 6a6b0e2 + 2630d08 commit 915fc90
Show file tree
Hide file tree
Showing 39 changed files with 6,749 additions and 4,990 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ yarn-error.log*
# Default ignored files
/shelf/
/workspace.xml
/.vscode/
.idea
# Editor-based HTTP Client requests
/httpRequests/
Expand Down
9 changes: 9 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"cSpell.enabled": true,
"cSpell.enableFiletypes": [
"mdx"
],
"cSpell.words": [
"webp"
]
}
28 changes: 28 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Contributing Guide

Thank you for your interest in contributing to our project! We appreciate your help in making it better. Please take a moment to review this guide before getting started.

> At the moment, we are not accepting unsolicited contributions.
>
> Ensure that the issue you'd like to help with is open to [Community Contribution](https://github.com/pieces-app/documentation/labels/community%20contribution). These issues are labels with the `community contribution` label.
## Table of Contents
- [Getting Started](#getting-started)
- [Contributing Process](#contributing-process)
- [Style Guide](#style-guide)

## Getting Started

To contribute to our project, you will need to have [Git](https://git-scm.com/) and [GitHub](https://github.com/) accounts. If you don't have them, please sign up and install Git on your machine.

## Contributing Process

1. Fork the repository.
1. Create a new branch for your contribution.
1. Make your changes and commit them.
1. Ensure your changes build.
1. Create a pull request from your fork.

## Style Guide

We follow the [Good docs project](https://www.thegooddocsproject.dev). Please refer to that for guidance on how to write and structure your documentation.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,13 @@ Our <a target="_blank" href="https://pieces.app">Flagship Desktop App</a> provid

## How to Contribute

Ensure that the issue you'd like to help with is open to [Community Contribution](https://github.com/pieces-app/documentation/labels/community%20contribution). These issues are labels with the `community contribution` label.
> At the moment, we are not accepting unsolicited contributions.
>
> Ensure that the issue you'd like to help with is open to [Community Contribution](https://github.com/pieces-app/documentation/labels/community%20contribution). These issues are labels with the `community contribution` label.
You can find guidance on how to contribute to the Pieces for Developers documentation in the [CONTRIBUTING.md](CONTRIBUTING.md) file.

## Run the Documentation Locally

### Prerequisites

Expand Down
224 changes: 224 additions & 0 deletions docs/extensions-plugins/cli/commands.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,224 @@
---
title: Pieces CLI Commands
description: Learn how to use the Pieces CLI commands to streamline your workflow and boost productivity.
---

import Video from "/src/components/Video";

# 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.

```bash
pieces run
```

### `clear`
Clears the terminal screen while staying in the command loop.

```bash
pieces clear
```

### `version`
Displays the version of Pieces OS and the CLI.

```bash
pieces version
```

### `help`
Displays a detailed help menu.

```bash
pieces help
```

## Asset Management

### `list`
Lists assets, applications, or models.

#### List Assets
Lists your most recent assets. Default is 10 assets.

```bash
pieces list
```

#### List Recent Assets
Displays your `x` most recent assets.

```bash
pieces list assets x
```

#### List Applications
Lists all registered applications.

```bash
pieces list apps
```

#### List AI Models
Lists all accessible AI models.

```bash
pieces list models
```

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

```bash
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.

```bash
pieces save
```

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

```bash
pieces create
```

### `edit`
Edits the name and classification of the current asset.

#### Edit Name
```bash
pieces edit --name "new name"
```

#### Edit Classification
```bash
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.

```bash
pieces delete
```

## Search and Query

### `search`
Performs a search for assets.

#### Perform a Fuzzy Search
Finds strings that approximately match patterns. Normal search.

```bash
pieces search [your query]
```

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

```bash
pieces search query --mode ncs
```

#### Perform a Full Text Search
Examines all words in a document to find matches to search criteria.

```bash
pieces search query --mode fts
```

## Conversation Management

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

```bash
pieces conversations
```

### `conversation`
Manages individual conversations.

#### List Messages in Current Conversation
Lists the messages in the conversation currently being used in the `ask` command.

```bash
pieces conversation
```

#### Create a New Conversation
Creates a new conversation.

```bash
pieces conversation -n
```

#### Rename a Conversation
Renames the current conversation.

```bash
pieces conversation -r "new name"
```

Or you can make the model rename it for you.

```bash
pieces conversation -r
```

#### Delete a Conversation
Deletes the current conversation.

```bash
pieces conversation -d
```

#### Switch Conversation
Switches the conversation and lists its messages. Check the `conversations` command to get the index.

```bash
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.

```bash
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.

```bash
pieces commit -i
```

### `login`
Logs in to your Pieces account.

```bash
pieces login
```

### `logout`
Logs out from your Pieces account.

```bash
pieces logout
```
24 changes: 24 additions & 0 deletions docs/extensions-plugins/cli/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
title: Pieces CLI
description: Understand the benefits and importance of using the Pieces CLI, and get started with Quickstart and Commands.
---

import { CardWithCTA } from "/src/components/Card";
import Grid from "/src/components/Grid";

The Pieces CLI is a command-line tool for interacting with Pieces OS, offering functionalities like code snippet management, copilot interaction, and integration with various features.

## Get Started

<Grid cols={2}>
<CardWithCTA title={'Quickstart'} description={'Learn how to set up and start using the Pieces CLI'} href={'/extensions-plugins/cli/quickstart'} />
<CardWithCTA title={'Commands'} description={'Explore the available cli commands'} href={'/extensions-plugins/cli/commands'} />
</Grid>

## Need Help?

If you encounter any issues or have questions, feel free to [reach out to our support team](/support) or consult the [FAQs](/faq).

## Want To Contribute?

The Pieces CLI is completely open-source and we welcome contributions. If you'd like to contribute, check out the [GitHub repository](https://github.com/pieces-app/cli-agent) to get started.
63 changes: 63 additions & 0 deletions docs/extensions-plugins/cli/quickstart.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
title: Pieces CLI Quickstart
description: Learn how to set up and start using the Pieces CLI.
---

import CTAButton from "/src/components/CTAButton";
import { pieces_app } from "/src/lib/const";

# Quickstart

In this tutorial, you'll learn how to set up and start using the Pieces CLI. We'll cover the installation process and basic usage to help you get up and running quickly.

<CTAButton
href={pieces_app.links.extensions.cli}
label={'Pieces CLI'}
icon={'/assets/pieces_logos/white_circle.png'}
iconDark={'/assets/pieces_logos/black_circle.png'}
type={'secondary'}
/>

## Prerequisites

- [Pieces OS](/installation-getting-started/what-am-i-installing) installed on your machine.
- [Python](https://www.python.org/downloads/) installed on your machine.

## Steps

### Step 1: Install the Pieces CLI
1. Ensure Pieces OS is installed and running on your system
2. Install the Python package:
```bash
pip install pieces-cli
```
Or via Homebrew:
```bash
brew install pieces-cli
```
Or via Conda:
```bash
conda install pieces-cli
```

### Step 2: Verify Installation
1. Open your terminal
2. Run the following command to verify the installation:
```bash
pieces version
```
If the installation was successful, you should see the version of the Pieces CLI.

### Step 3: Explore Basic Commands
Run the following command to see the available commands:
```bash
pieces help
```

Congratulations! You have successfully set up and started using the Pieces CLI.

## Next Steps
Explore more features and commands to streamline your workflow and boost productivity.

- [Commands](/extensions-plugins/cli/commands)
- [Pieces CLI GitHub Repository](https://github.com/pieces-app/cli-agent)
Loading

0 comments on commit 915fc90

Please sign in to comment.