Skip to content

Commit dc44ba9

Browse files
committed
docs(cli): reflect packaging changes.
1 parent 4f12fd5 commit dc44ba9

File tree

1 file changed

+31
-45
lines changed

1 file changed

+31
-45
lines changed

docs/cli.md

Lines changed: 31 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
* [Installation](#installation)
77
* [Install from Source](#install-from-source)
8-
* [Migration from `pipx`](#migration-from-pipx)
98
* [Chromadb](#chromadb)
109
* [For Windows Users](#for-windows-users)
1110
* [Legacy Environments](#legacy-environments)
@@ -55,44 +54,31 @@ your system Python or project-local virtual environments.
5554

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

6968
If you need to install multiple dependency group (for [LSP](#lsp-mode) or
7069
[MCP](#mcp-server)), you can use the following syntax:
7170
```bash
72-
uv tool install "vectorcode[lsp,mcp]<1.0.0"
71+
uv tool install "vectorcode[lsp,mcp,chroma0]"
7372
```
7473

7574
> [!NOTE]
7675
> The command only install VectorCode and `SentenceTransformer`, the default
7776
> embedding engine. If you need to install an extra dependency, you can use
78-
> `uv tool install vectorcode --with <your_deps_here>`
77+
> `uv tool install vectorcode[chroma0] --with <your_deps_here>`
7978
8079
### Install from Source
81-
To install from source, either `git clone` this repository and run `uv tool install
82-
<path_to_vectorcode_repo>`, or use `pipx`:
83-
```bash
84-
pipx install git+https://github.com/Davidyz/VectorCode
85-
```
86-
87-
### Migration from `pipx`
88-
89-
The motivation behind the change from `pipx` to `uv tool` is mainly the
90-
performance. The caching mechanism in uv makes it a lot faster than `pipx` for a
91-
lot of operations. If you installed VectorCode via `pipx`, you can continue to
92-
use `pipx` to manage your VectorCode installation. If you wish to switch to
93-
`uv`, you need to uninstall VectorCode using `pipx` and then use `uv` to install
94-
it as described above. All your VectorCode configurations and database files
95-
will work out of the box on your new install.
80+
To install from source, please `git clone` this repository and run `uv tool install
81+
<path_to_vectorcode_repo>`.
9682

9783
### Chromadb
9884
[Chromadb](https://www.trychroma.com/) is the vector database used by VectorCode
@@ -103,10 +89,6 @@ set up a standalone local server (they provides detailed instructions through
10389
[systemd](https://cookbook.chromadb.dev/running/systemd-service/)), because this
10490
will significantly reduce the IO overhead and avoid potential race condition.
10591

106-
> If you're setting up a standalone ChromaDB server, I recommend sticking to
107-
> v0.6.3,
108-
> because VectorCode is not ready for the upgrade to ChromaDB 1.0 yet.
109-
11092
### For Windows Users
11193

11294
Windows support is not officially tested at this moment. [This PR](https://github.com/Davidyz/VectorCode/pull/40)
@@ -328,17 +310,19 @@ The JSON configuration file may hold the following values:
328310
}
329311
```
330312
- `filetype_map`: `dict[str, list[str]]`, a dictionary where keys are
331-
[language name](https://github.com/Goldziher/tree-sitter-language-pack?tab=readme-ov-file#available-languages)
332-
and values are lists of [Python regex patterns](https://docs.python.org/3/library/re.html)
333-
that will match file extensions. This allows overriding automatic language
334-
detection and specifying a treesitter parser for certain file types for which the language parser cannot be
335-
correctly identified (e.g., `.phtml` files containing both php and html).
336-
Example configuration:
337-
```json5
313+
[language name](https://github.com/Goldziher/tree-sitter-language-pack?tab=readme-ov-file#available-languages)
314+
and values are lists of [Python regex patterns](https://docs.python.org/3/library/re.html)
315+
that will match file extensions. This allows overriding automatic language
316+
detection and specifying a treesitter parser for certain file types for which the language parser cannot be
317+
correctly identified (e.g., `.phtml` files containing both php and html).
318+
Example configuration:
319+
```json5
320+
{
338321
"filetype_map": {
339-
"php": ["^phtml$"]
340-
}
341-
```
322+
"php": ["^phtml$"],
323+
},
324+
}
325+
```
342326

343327
- `chunk_filters`: `dict[str, list[str]]`, a dictionary where the keys are
344328
[language name](https://github.com/Goldziher/tree-sitter-language-pack?tab=readme-ov-file#available-languages)
@@ -347,10 +331,12 @@ The JSON configuration file may hold the following values:
347331
to languages supported by treesitter chunker. By default, no filters will be
348332
added. Example configuration:
349333
```json5
350-
"chunk_filters": {
351-
"python": ["^[^a-zA-Z0-9]+$"], // multiple patterns will be merged (unioned)
352-
// or you can use wildcard to match any languages that has no dedicated filters:
353-
"*": ["^[^a-zA-Z0-9]+$"],
334+
{
335+
"chunk_filters": {
336+
"python": ["^[^a-zA-Z0-9]+$"], // multiple patterns will be merged (unioned)
337+
// or you can use wildcard to match any languages that has no dedicated filters:
338+
"*": ["^[^a-zA-Z0-9]+$"],
339+
},
354340
}
355341
```
356342
- `encoding`: string, alternative encoding used for this project. By default
@@ -652,13 +638,13 @@ The output is in JSON format. It contains a dictionary with the following fields
652638
A JSON array of collection information of the following format will be printed:
653639
```json
654640
{
655-
"project_root": str,
656-
"user": str,
657-
"hostname": str,
658-
"collection_name": str,
659-
"size": int,
660-
"num_files": int,
661-
"embedding_function": str
641+
"project_root": "project_root",
642+
"user": "user",
643+
"hostname": "host",
644+
"collection_name": "fuerbvo13571943ofuib",
645+
"size": 10,
646+
"num_files": 100,
647+
"embedding_function": "SomeEmbeddingFunction"
662648
}
663649
```
664650
- `"project_root"`: the path to the `project-root`;

0 commit comments

Comments
 (0)