Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update CLI commands documentation #540

Merged
merged 2 commits into from
Aug 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletion docs/extensions-plugins/cli/commands.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ pieces list apps
```

#### List AI Models
Lists all accessible AI models.
Lists all accessible AI models and opens the list to change the model to be used in the ask command.

```bash
pieces list models
Expand Down Expand Up @@ -223,6 +223,26 @@ Switches the conversation and lists its messages. Check the `conversations` comm
pieces conversation x
```

### `Ask`

The ask command allows you to ask the Pieces Copilot a question. By default, it uses the GPT-3.5 model, but you can change the model using the `list models` command. You can also add relevant files and snippets to provide more context for your question.
The question that is asked, will generate a new conversation. To change the current conversation use the `conversation` command

```shell
pieces ask "your question" -f /file1 /file2 folder -s 1 2 3
```

- **"your question":** The question you want to ask the Pieces Copilot. It must be enclosed in quotes.
- **f /file1 /file2 folder: (Optional)** Paths to files or folders that are relevant to your question. You can specify multiple files or folders.
- **s 1 2 3: (Optional)** Indices of snippets that are relevant to your question. You can specify multiple snippet indices

### `change_model` (deprecated)
Change the model used in the ask command.

```bash
pieces change_model [MODEL_INDEX]
```

## Integration

### `commit`
Expand All @@ -238,6 +258,12 @@ You can also add the `-i` or `--issues` flags so the commit message will include
pieces commit -i
```

By adding the `-a` or the `--all` flags, All changes will be staged first, before generating the commiting messages

```shell
pieces commit -a
```

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

Expand Down