Skip to content

Commit 4232d9c

Browse files
authored
docs: Documentation updates. (#284)
* docs: documentation updates. * Auto generate docs * docs(cli): suggest to pin version to `<1.0.0` * Auto generate docs
1 parent fafcd7a commit 4232d9c

File tree

4 files changed

+88
-84
lines changed

4 files changed

+88
-84
lines changed

doc/VectorCode-cli.txt

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ virtual environments.
6666
After installing `uv`, run:
6767

6868
>bash
69-
uv tool install vectorcode
69+
uv tool install "vectorcode<1.0.0"
7070
<
7171

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

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

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

8585
>bash
86-
uv tool install 'vectorcode[lsp,mcp]'
86+
uv tool install "vectorcode[lsp,mcp]<1.0.0"
8787
<
8888

8989

@@ -640,7 +640,7 @@ following options in the JSON config file:
640640
"embedding_params": {
641641
"backend": "torch",
642642
"device": "cuda"
643-
},
643+
}
644644
}
645645
<
646646

@@ -655,8 +655,8 @@ need to configure `SentenceTransformer` to use `openvino` backend. In your
655655
>json
656656
{
657657
"embedding_params": {
658-
"backend": "openvino",
659-
},
658+
"backend": "openvino"
659+
}
660660
}
661661
<
662662

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

688688
>json
689689
[
690-
{
691-
"path": "path_to_your_code.py",
692-
"document":"import something"
693-
},
694-
{
695-
"path": "path_to_another_file.py",
696-
"document": "print('hello world')"
697-
}
690+
{
691+
"path": "path_to_your_code.py",
692+
"document": "import something"
693+
},
694+
{
695+
"path": "path_to_another_file.py",
696+
"document": "print('hello world')"
697+
}
698698
]
699699
<
700700

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

706706
>json
707707
[
708-
{
709-
"path": "path_to_your_code.py",
710-
"chunk": "foo",
711-
"start_line": 1,
712-
"end_line": 1,
713-
"chunk_id": "chunk_id_1"
714-
},
715-
{
716-
"path": "path_to_another_file.py",
717-
"chunk": "bar",
718-
"start_line": 1,
719-
"end_line": 1,
720-
"chunk_id": "chunk_id_2"
721-
}
708+
{
709+
"path": "path_to_your_code.py",
710+
"chunk": "foo",
711+
"start_line": 1,
712+
"end_line": 1,
713+
"chunk_id": "chunk_id_1"
714+
},
715+
{
716+
"path": "path_to_another_file.py",
717+
"chunk": "bar",
718+
"start_line": 1,
719+
"end_line": 1,
720+
"chunk_id": "chunk_id_2"
721+
}
722722
]
723723
<
724724

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

744744
>json
745745
{
746-
"project_root": str,
747-
"user": str,
748-
"hostname": str,
749-
"collection_name": str,
750-
"size": int,
751-
"num_files": int,
752-
"embedding_function": str
746+
"project_root": str,
747+
"user": str,
748+
"hostname": str,
749+
"collection_name": str,
750+
"size": int,
751+
"num_files": int,
752+
"embedding_function": str
753753
}
754754
<
755755

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

793793
>
794794
{
795-
command: str
796-
arguments: list[Any]
795+
command: str
796+
arguments: list[Any]
797797
}
798798
<
799799

@@ -804,8 +804,8 @@ request would be:
804804

805805
>
806806
{
807-
command: "vectorcode",
808-
arguments: ["query", "-n", "10", "reranker"]
807+
command: "vectorcode",
808+
arguments: ["query", "-n", "10", "reranker"]
809809
}
810810
<
811811

doc/VectorCode.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ Table of Contents *VectorCode-table-of-contents*
1515
1. NeoVim Plugin *VectorCode-neovim-plugin*
1616

1717

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

2223
[!NOTE] When the neovim plugin doesn’t work properly, please try upgrading
2324
both the CLI and the neovim plugin to the latest version before opening an

docs/cli.md

Lines changed: 40 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -55,22 +55,23 @@ your system Python or project-local virtual environments.
5555

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

6969
If you need to install multiple dependency group (for [LSP](#lsp-mode) or
7070
[MCP](#mcp-server)), you can use the following syntax:
7171
```bash
72-
uv tool install 'vectorcode[lsp,mcp]'
72+
uv tool install "vectorcode[lsp,mcp]<1.0.0"
7373
```
74+
7475
> [!NOTE]
7576
> The command only install VectorCode and `SentenceTransformer`, the default
7677
> embedding engine. If you need to install an extra dependency, you can use
@@ -580,7 +581,7 @@ following options in the JSON config file:
580581
"embedding_params": {
581582
"backend": "torch",
582583
"device": "cuda"
583-
},
584+
}
584585
}
585586
```
586587

@@ -593,8 +594,8 @@ need to configure `SentenceTransformer` to use `openvino` backend. In your
593594
```json
594595
{
595596
"embedding_params": {
596-
"backend": "openvino",
597-
},
597+
"backend": "openvino"
598+
}
598599
}
599600
```
600601
This will run the embedding model on your GPU. This is supported even for
@@ -618,14 +619,14 @@ fact, this is exactly what I did when I wrote the neovim plugin.
618619
For the query command, here's the format printed in the `pipe` mode:
619620
```json
620621
[
621-
{
622-
"path": "path_to_your_code.py",
623-
"document":"import something"
624-
},
625-
{
626-
"path": "path_to_another_file.py",
627-
"document": "print('hello world')"
628-
}
622+
{
623+
"path": "path_to_your_code.py",
624+
"document": "import something"
625+
},
626+
{
627+
"path": "path_to_another_file.py",
628+
"document": "print('hello world')"
629+
}
629630
]
630631
```
631632
Basically an array of dictionaries with 2 keys: `"path"` for the path to the
@@ -634,20 +635,20 @@ document, and `"document"` for the content of the document.
634635
If you used `--include chunk path` parameters, the array will look like this:
635636
```json
636637
[
637-
{
638-
"path": "path_to_your_code.py",
639-
"chunk": "foo",
640-
"start_line": 1,
641-
"end_line": 1,
642-
"chunk_id": "chunk_id_1"
643-
},
644-
{
645-
"path": "path_to_another_file.py",
646-
"chunk": "bar",
647-
"start_line": 1,
648-
"end_line": 1,
649-
"chunk_id": "chunk_id_2"
650-
}
638+
{
639+
"path": "path_to_your_code.py",
640+
"chunk": "foo",
641+
"start_line": 1,
642+
"end_line": 1,
643+
"chunk_id": "chunk_id_1"
644+
},
645+
{
646+
"path": "path_to_another_file.py",
647+
"chunk": "bar",
648+
"start_line": 1,
649+
"end_line": 1,
650+
"chunk_id": "chunk_id_2"
651+
}
651652
]
652653
```
653654
Keep in mind that both `start_line` and `end_line` are inclusive. The `chunk_id`
@@ -668,13 +669,13 @@ The output is in JSON format. It contains a dictionary with the following fields
668669
A JSON array of collection information of the following format will be printed:
669670
```json
670671
{
671-
"project_root": str,
672-
"user": str,
673-
"hostname": str,
674-
"collection_name": str,
675-
"size": int,
676-
"num_files": int,
677-
"embedding_function": str
672+
"project_root": str,
673+
"user": str,
674+
"hostname": str,
675+
"collection_name": str,
676+
"size": int,
677+
"num_files": int,
678+
"embedding_function": str
678679
}
679680
```
680681
- `"project_root"`: the path to the `project-root`;
@@ -711,8 +712,8 @@ pipx inject vectorcode 'vectorcode[lsp]' --force
711712
The LSP request for the `workspace/executeCommand` is defined as follows:
712713
```
713714
{
714-
command: str
715-
arguments: list[Any]
715+
command: str
716+
arguments: list[Any]
716717
}
717718
```
718719
For the `vectorcode-server`, the only valid value for the `command` key is
@@ -721,8 +722,8 @@ command. For example, to execute `vectorcode query -n 10 reranker`, the request
721722
would be:
722723
```
723724
{
724-
command: "vectorcode",
725-
arguments: ["query", "-n", "10", "reranker"]
725+
command: "vectorcode",
726+
arguments: ["query", "-n", "10", "reranker"]
726727
}
727728
```
728729

docs/neovim/README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# NeoVim Plugin
22

33
> [!NOTE]
4-
> This plugin depends on the CLI tool. Please go through
5-
> [the CLI documentation](../cli/README.md) and make sure the VectorCode CLI is working
6-
> before proceeding.
4+
> This plugin depends on the CLI tool. You should follow
5+
> [the CLI documentation](../cli/README.md) to install the CLI and familiarise
6+
> yourself with
7+
> [the basic usage of the CLI interface](../cli/README.md#getting-started)
8+
> before you proceed.
79
810
> [!NOTE]
911
> When the neovim plugin doesn't work properly, please try upgrading both the CLI

0 commit comments

Comments
 (0)