Skip to content
Merged
Show file tree
Hide file tree
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
78 changes: 39 additions & 39 deletions doc/VectorCode-cli.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ virtual environments.
After installing `uv`, run:

>bash
uv tool install vectorcode
uv tool install "vectorcode<1.0.0"
<

in your shell. To specify a particular version of Python, use the `--python`
Expand All @@ -76,14 +76,14 @@ If you want a CPU-only installation without CUDA dependencies required by
default by PyTorch, run:

>bash
uv tool install vectorcode --index https://download.pytorch.org/whl/cpu --index-strategy unsafe-best-match
uv tool install "vectorcode<1.0.0" --index https://download.pytorch.org/whl/cpu --index-strategy unsafe-best-match
<

If you need to install multiple dependency group (for |VectorCode-cli-lsp| or
|VectorCode-cli-mcp|), you can use the following syntax:

>bash
uv tool install 'vectorcode[lsp,mcp]'
uv tool install "vectorcode[lsp,mcp]<1.0.0"
<


Expand Down Expand Up @@ -640,7 +640,7 @@ following options in the JSON config file:
"embedding_params": {
"backend": "torch",
"device": "cuda"
},
}
}
<

Expand All @@ -655,8 +655,8 @@ need to configure `SentenceTransformer` to use `openvino` backend. In your
>json
{
"embedding_params": {
"backend": "openvino",
},
"backend": "openvino"
}
}
<

Expand Down Expand Up @@ -687,14 +687,14 @@ For the query command, here’s the format printed in the `pipe` mode:

>json
[
{
"path": "path_to_your_code.py",
"document":"import something"
},
{
"path": "path_to_another_file.py",
"document": "print('hello world')"
}
{
"path": "path_to_your_code.py",
"document": "import something"
},
{
"path": "path_to_another_file.py",
"document": "print('hello world')"
}
]
<

Expand All @@ -705,20 +705,20 @@ If you used `--include chunk path` parameters, the array will look like this:

>json
[
{
"path": "path_to_your_code.py",
"chunk": "foo",
"start_line": 1,
"end_line": 1,
"chunk_id": "chunk_id_1"
},
{
"path": "path_to_another_file.py",
"chunk": "bar",
"start_line": 1,
"end_line": 1,
"chunk_id": "chunk_id_2"
}
{
"path": "path_to_your_code.py",
"chunk": "foo",
"start_line": 1,
"end_line": 1,
"chunk_id": "chunk_id_1"
},
{
"path": "path_to_another_file.py",
"chunk": "bar",
"start_line": 1,
"end_line": 1,
"chunk_id": "chunk_id_2"
}
]
<

Expand All @@ -743,13 +743,13 @@ A JSON array of collection information of the following format will be printed:

>json
{
"project_root": str,
"user": str,
"hostname": str,
"collection_name": str,
"size": int,
"num_files": int,
"embedding_function": str
"project_root": str,
"user": str,
"hostname": str,
"collection_name": str,
"size": int,
"num_files": int,
"embedding_function": str
}
<

Expand Down Expand Up @@ -792,8 +792,8 @@ The LSP request for the `workspace/executeCommand` is defined as follows:

>
{
command: str
arguments: list[Any]
command: str
arguments: list[Any]
}
<

Expand All @@ -804,8 +804,8 @@ request would be:

>
{
command: "vectorcode",
arguments: ["query", "-n", "10", "reranker"]
command: "vectorcode",
arguments: ["query", "-n", "10", "reranker"]
}
<

Expand Down
7 changes: 4 additions & 3 deletions doc/VectorCode.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ Table of Contents *VectorCode-table-of-contents*
1. NeoVim Plugin *VectorCode-neovim-plugin*


[!NOTE] This plugin depends on the CLI tool. Please go through the CLI
documentation <../cli/README.md> and make sure the VectorCode CLI is working
before proceeding.
[!NOTE] This plugin depends on the CLI tool. You should follow the CLI
documentation <../cli/README.md> to install the CLI and familiarise yourself
with the basic usage of the CLI interface <../cli/README.md#getting-started>
before you proceed.

[!NOTE] When the neovim plugin doesn’t work properly, please try upgrading
both the CLI and the neovim plugin to the latest version before opening an
Expand Down
79 changes: 40 additions & 39 deletions docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,22 +55,23 @@ your system Python or project-local virtual environments.

After installing `uv`, run:
```bash
uv tool install vectorcode
uv tool install "vectorcode<1.0.0"
```
in your shell. To specify a particular version of Python, use the `--python`
flag. For example, `uv tool install vectorcode --python python3.11`. For hardware
accelerated embedding, refer to [the relevant section](#hardware-acceleration).
If you want a CPU-only installation without CUDA dependencies required by
default by PyTorch, run:
```bash
uv tool install vectorcode --index https://download.pytorch.org/whl/cpu --index-strategy unsafe-best-match
uv tool install "vectorcode<1.0.0" --index https://download.pytorch.org/whl/cpu --index-strategy unsafe-best-match
```

If you need to install multiple dependency group (for [LSP](#lsp-mode) or
[MCP](#mcp-server)), you can use the following syntax:
```bash
uv tool install 'vectorcode[lsp,mcp]'
uv tool install "vectorcode[lsp,mcp]<1.0.0"
```

> [!NOTE]
> The command only install VectorCode and `SentenceTransformer`, the default
> embedding engine. If you need to install an extra dependency, you can use
Expand Down Expand Up @@ -580,7 +581,7 @@ following options in the JSON config file:
"embedding_params": {
"backend": "torch",
"device": "cuda"
},
}
}
```

Expand All @@ -593,8 +594,8 @@ need to configure `SentenceTransformer` to use `openvino` backend. In your
```json
{
"embedding_params": {
"backend": "openvino",
},
"backend": "openvino"
}
}
```
This will run the embedding model on your GPU. This is supported even for
Expand All @@ -618,14 +619,14 @@ fact, this is exactly what I did when I wrote the neovim plugin.
For the query command, here's the format printed in the `pipe` mode:
```json
[
{
"path": "path_to_your_code.py",
"document":"import something"
},
{
"path": "path_to_another_file.py",
"document": "print('hello world')"
}
{
"path": "path_to_your_code.py",
"document": "import something"
},
{
"path": "path_to_another_file.py",
"document": "print('hello world')"
}
]
```
Basically an array of dictionaries with 2 keys: `"path"` for the path to the
Expand All @@ -634,20 +635,20 @@ document, and `"document"` for the content of the document.
If you used `--include chunk path` parameters, the array will look like this:
```json
[
{
"path": "path_to_your_code.py",
"chunk": "foo",
"start_line": 1,
"end_line": 1,
"chunk_id": "chunk_id_1"
},
{
"path": "path_to_another_file.py",
"chunk": "bar",
"start_line": 1,
"end_line": 1,
"chunk_id": "chunk_id_2"
}
{
"path": "path_to_your_code.py",
"chunk": "foo",
"start_line": 1,
"end_line": 1,
"chunk_id": "chunk_id_1"
},
{
"path": "path_to_another_file.py",
"chunk": "bar",
"start_line": 1,
"end_line": 1,
"chunk_id": "chunk_id_2"
}
]
```
Keep in mind that both `start_line` and `end_line` are inclusive. The `chunk_id`
Expand All @@ -668,13 +669,13 @@ The output is in JSON format. It contains a dictionary with the following fields
A JSON array of collection information of the following format will be printed:
```json
{
"project_root": str,
"user": str,
"hostname": str,
"collection_name": str,
"size": int,
"num_files": int,
"embedding_function": str
"project_root": str,
"user": str,
"hostname": str,
"collection_name": str,
"size": int,
"num_files": int,
"embedding_function": str
}
```
- `"project_root"`: the path to the `project-root`;
Expand Down Expand Up @@ -711,8 +712,8 @@ pipx inject vectorcode 'vectorcode[lsp]' --force
The LSP request for the `workspace/executeCommand` is defined as follows:
```
{
command: str
arguments: list[Any]
command: str
arguments: list[Any]
}
```
For the `vectorcode-server`, the only valid value for the `command` key is
Expand All @@ -721,8 +722,8 @@ command. For example, to execute `vectorcode query -n 10 reranker`, the request
would be:
```
{
command: "vectorcode",
arguments: ["query", "-n", "10", "reranker"]
command: "vectorcode",
arguments: ["query", "-n", "10", "reranker"]
}
```

Expand Down
8 changes: 5 additions & 3 deletions docs/neovim/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# NeoVim Plugin

> [!NOTE]
> This plugin depends on the CLI tool. Please go through
> [the CLI documentation](../cli/README.md) and make sure the VectorCode CLI is working
> before proceeding.
> This plugin depends on the CLI tool. You should follow
> [the CLI documentation](../cli/README.md) to install the CLI and familiarise
> yourself with
> [the basic usage of the CLI interface](../cli/README.md#getting-started)
> before you proceed.

> [!NOTE]
> When the neovim plugin doesn't work properly, please try upgrading both the CLI
Expand Down