55
66* [ Installation] ( #installation )
77 * [ Install from Source] ( #install-from-source )
8+ * [ Migration from ` pipx ` ] ( #migration-from-pipx )
89 * [ Chromadb] ( #chromadb )
9- * [ For Windows Users] ( #for-windows-users )
10+ * [ For Windows Users] ( #for-windows-users )
1011 * [ Legacy Environments] ( #legacy-environments )
1112 * [ Nix] ( #nix )
1213* [ Getting Started] ( #getting-started )
@@ -44,42 +45,50 @@ compiler because the core components of the vector database (ChromaDB) contains
4445c++ and rust code.
4546
4647The recommended way of
47- installation is through [ ` pipx ` ] ( https://pipx.pypa.io/stable / ) , which will
48+ installation is through [ ` uv ` ] ( https://docs.astral.sh/uv / ) , which will
4849create a virtual environment for the package itself that doesn't mess up with
4950your system Python or project-local virtual environments.
5051
51- After installing ` pipx ` , run:
52+ After installing ` uv ` , run:
5253``` bash
53- pipx install vectorcode
54+ uv tool install vectorcode
5455```
5556in your shell. To specify a particular version of Python, use the ` --python `
56- flag. For example, ` pipx install vectorcode --python python3.11` . For hardware
57+ flag. For example, ` uv tool install vectorcode --python python3.11` . For hardware
5758accelerated embedding, refer to [ the relevant section] ( #hardware-acceleration ) .
58- If you want a cpu -only installation without CUDA dependences required by
59- default by pytorch , run:
59+ If you want a CPU -only installation without CUDA dependencies required by
60+ default by PyTorch , run:
6061``` bash
61- PIP_INDEX_URL= " https://download.pytorch.org/whl/cpu" PIP_EXTRA_INDEX_URL= " https://pypi.org/simple " pipx install vectorcode
62+ uv tool install vectorcode --index https://download.pytorch.org/whl/cpu --index-strategy unsafe-best-match
6263```
6364
6465If you need to install multiple dependency group (for [ LSP] ( #lsp-mode ) or
6566[ MCP] ( #mcp-server ) ), you can use the following syntax:
6667``` bash
67- pipx install vectorcode[lsp,mcp]
68+ uv tool install vectorcode[lsp,mcp]
6869```
6970> [ !NOTE]
7071> The command only install VectorCode and ` SentenceTransformer ` , the default
71- > embedding engine. To use a different embedding function supported by Chromadb,
72- > you may need to use ` pipx inject ` to install extra dependences to the virtual
73- > environment that ` pipx ` creates for VectorCode. This may include OpenAI,
74- > Ollama and other self/cloud-hosted embedding model providers.
72+ > embedding engine. If you need to install an extra dependency, you can use
73+ > ` uv tool install vectorcode --with <your_deps_here> `
7574
7675### Install from Source
77- To install from source, either ` git clone ` this reposority and run `pipx install
78- <path_to_vectorcode_repo>`, or use the git URL :
76+ To install from source, either ` git clone ` this repository and run `uv tool install
77+ <path_to_vectorcode_repo>` , or use ` pipx` :
7978``` bash
8079pipx install git+https://github.com/Davidyz/VectorCode
8180```
8281
82+ ### Migration from ` pipx `
83+
84+ The motivation behind the change from ` pipx ` to ` uv tool ` is mainly the
85+ performance. The caching mechanism in uv makes it a lot faster than ` pipx ` for a
86+ lot of operations. If you installed VectorCode via ` pipx ` , you can continue to
87+ use ` pipx ` to manage your VectorCode installation. If you wish to switch to
88+ ` uv ` , you need to uninstall VectorCode using ` pipx ` and then use ` uv ` to install
89+ it as described above. All your VectorCode configurations and database files
90+ will work out of the box on your new install.
91+
8392### Chromadb
8493[ Chromadb] ( https://www.trychroma.com/ ) is the vector database used by VectorCode
8594to store and retrieve the code embeddings. Although it is already bundled with
@@ -94,19 +103,19 @@ will significantly reduce the IO overhead and avoid potential race condition.
94103> ChromaDB recently released v1.0.0, which may not work with VectorCode. I'm
95104> testing with v1.0.0 and will publish a new release when it's ready.
96105
97- #### For Windows Users
106+ ### For Windows Users
98107
99108Windows support is not officially tested at this moment. [ This PR] ( https://github.com/Davidyz/VectorCode/pull/40 )
100109tracks my progress trying to provide better experiences for windows users.
101110
102111### Legacy Environments
103112
104113If your environment doesn't support ` numpy ` version 2.0+, the default,
105- unconstrained numpy picked by ` pipx ` may not work for you. In this case, you can
106- try installing the package by ` pipx install vectorcode[legacy]` , which enforces
114+ unconstrained numpy may not work for you. In this case, you can
115+ try installing the package by ` uv tool install vectorcode[legacy]` , which enforces
107116numpy ` v1.x ` . If this doesn't help, please open an issue with your OS, CPU
108117architecture, python version and the vectorcode virtual environment
109- (` pipx runpip vectorcode freeze` ).
118+ (` uv tool run --from= vectorcode python -m ensurepip && uv tool run --from=vectorcode python -m pip freeze` ).
110119
111120### Nix
112121
0 commit comments